You are here

private function SitemapWarmer::cdnWarmer in Warmer 8

Same name and namespace in other branches
  1. 2.x modules/warmer_cdn/src/Plugin/warmer/SitemapWarmer.php \Drupal\warmer_cdn\Plugin\warmer\SitemapWarmer::cdnWarmer()

Lazily get the CDN warmer.

Return value

\Drupal\warmer_cdn\Plugin\warmer\CdnWarmer The CDN warmer.

Throws

\Drupal\Component\Plugin\Exception\PluginException

File

modules/warmer_cdn/src/Plugin/warmer/SitemapWarmer.php, line 241

Class

SitemapWarmer
The cache warmer for the built-in entity cache.

Namespace

Drupal\warmer_cdn\Plugin\warmer

Code

private function cdnWarmer() {
  if ($this->warmer instanceof CdnWarmer) {
    return $this->warmer;
  }
  $configuration = $this
    ->getConfiguration();
  $warmer = $this->warmerManager
    ->createInstance('cdn', [
    'headers' => $configuration['headers'],
    'verify' => $configuration['verify'],
  ]);
  assert($warmer instanceof CdnWarmer);
  $this->warmer = $warmer;
  return $warmer;
}