public function Zone::__construct in CloudFlare 8
Zone constructor.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.
\Psr\Log\LoggerInterface $logger: A logger instance.
\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend.
\Drupal\cloudflare\CloudFlareStateInterface $state: Tracks rate limits associated with CloudFlare Api.
\CloudFlarePhpSdk\ApiEndpoints\ZoneApi|null $zone_api: ZoneApi instance for accessing api.
\Drupal\cloudflare\CloudFlareComposerDependenciesCheckInterface $check_interface: Checks that composer dependencies are met.
File
- src/
Zone.php, line 121
Class
- Zone
- Zone methods for CloudFlare.
Namespace
Drupal\cloudflareCode
public function __construct(ConfigFactoryInterface $config_factory, LoggerInterface $logger, CacheBackendInterface $cache, CloudFlareStateInterface $state, $zone_api, CloudFlareComposerDependenciesCheckInterface $check_interface) {
$this->config = $config_factory
->get('cloudflare.settings');
$this->logger = $logger;
$this->cache = $cache;
$this->state = $state;
$this->zoneApi = $zone_api;
$this->zone = $this->config
->get('zone');
$this->validCredentials = $this->config
->get('valid_credentials');
$this->cloudFlareComposerDependenciesCheck = $check_interface;
}