You are here

public function VarnishPurgerBase::__construct in Varnish purger 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Purge/Purger/VarnishPurgerBase.php \Drupal\varnish_purger\Plugin\Purge\Purger\VarnishPurgerBase::__construct()

Constructs the Varnish purger.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

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

\Drupal\Core\Utility\Token $token: The token service.

Overrides PurgerBase::__construct

File

src/Plugin/Purge/Purger/VarnishPurgerBase.php, line 50

Class

VarnishPurgerBase
Abstract base class for HTTP based configurable purgers.

Namespace

Drupal\varnish_purger\Plugin\Purge\Purger

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ClientInterface $http_client, Token $token) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->settings = VarnishPurgerSettings::load($this
    ->getId());
  $this->client = $http_client;
  $this->token = $token;
}