protected function HttpPurgerBase::getOptions in Generic HTTP Purger 8
Retrieve the Guzzle connection options to set.
Parameters
array $token_data: An array of keyed objects, to pass on to the token service.
Return value
mixed[] Associative array with option/value pairs.
2 calls to HttpPurgerBase::getOptions()
- HttpBundledPurger::invalidate in src/
Plugin/ Purge/ Purger/ HttpBundledPurger.php - Invalidate content from external caches.
- HttpPurger::invalidate in src/
Plugin/ Purge/ Purger/ HttpPurger.php - Invalidate content from external caches.
File
- src/
Plugin/ Purge/ Purger/ HttpPurgerBase.php, line 141
Class
- HttpPurgerBase
- Abstract base class for HTTP based configurable purgers.
Namespace
Drupal\purge_purger_http\Plugin\Purge\PurgerCode
protected function getOptions(array $token_data) {
$opt = [
'http_errors' => $this->settings->http_errors,
'connect_timeout' => $this->settings->connect_timeout,
'timeout' => $this->settings->timeout,
'headers' => $this
->getHeaders($token_data),
];
if (strlen($this->settings->body)) {
$opt['body'] = $this->token
->replace($this->settings->body, $token_data);
}
if ($this->settings->scheme === 'https') {
$opt['verify'] = $this->settings->verify;
}
return $opt;
}