You are here

public function UrlRegistrar::__construct in URLs queuer 8

Constructs a UrlRegistrar object.

Parameters

\Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel: The decorated kernel.

\Drupal\purge_queuer_url\TrafficRegistryInterface $registry: The traffic registry with the stored URLs and tags.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.

File

src/StackMiddleware/UrlRegistrar.php, line 69

Class

UrlRegistrar
Collects URLs for all passing traffic.

Namespace

Drupal\purge_queuer_url\StackMiddleware

Code

public function __construct(HttpKernelInterface $http_kernel, TrafficRegistryInterface $registry, ConfigFactoryInterface $config_factory) {
  $this->httpKernel = $http_kernel;
  $this->registry = $registry;

  // Take the configured settings from our configuration object.
  $settings = $config_factory
    ->get('purge_queuer_url.settings');
  $this->blacklist = $settings
    ->get('blacklist');
  $this->queuePaths = $settings
    ->get('queue_paths');
  if ($settings
    ->get('host_override')) {
    $this->host = $settings
      ->get('host');
  }
  if ($settings
    ->get('scheme_override')) {
    $this->scheme = $settings
      ->get('scheme');
  }
}