You are here

public function FastlyBackend::__construct in Acquia Purge 8

Construct a vendor backend for the Platform CDN purger.

Parameters

array $config: Acquia Platform CDN configuration settings.

\Drupal\acquia_purge\AcquiaCloud\PlatformInfoInterface $acquia_purge_platforminfo: Information object interfacing with the Acquia platform.

\Drupal\purge\Logger\LoggerChannelPartInterface $logger: The logger passed to the Platform CDN purger.

\Drupal\acquia_purge\Plugin\Purge\Purger\DebuggerInterface $debugger: The centralized debugger for Acquia purger plugins.

\GuzzleHttp\ClientInterface $http_client: An HTTP client that can perform remote requests.

Overrides BackendBase::__construct

File

src/AcquiaPlatformCdn/FastlyBackend.php, line 53

Class

FastlyBackend
Provides a Fastly backend for the Platform CDN purger.

Namespace

Drupal\acquia_purge\AcquiaPlatformCdn

Code

public function __construct(array $config, PlatformInfoInterface $acquia_purge_platforminfo, LoggerChannelPartInterface $logger, DebuggerInterface $debugger, ClientInterface $http_client) {
  parent::__construct($config, $acquia_purge_platforminfo, $logger, $debugger, $http_client);
  $this->serviceId = (string) $this->config['service_id'];
  $this->token = (string) $this->config['token'];

  // Call platformInfo() to having platform information accessible to
  // the static helper functions.
  self::platformInfo($this->platformInfo);
}