function DatabaseBackendFactory::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Cache/DatabaseBackendFactory.php \Drupal\Core\Cache\DatabaseBackendFactory::__construct()
  2. 10 core/lib/Drupal/Core/Cache/DatabaseBackendFactory.php \Drupal\Core\Cache\DatabaseBackendFactory::__construct()
  3. 11.x core/lib/Drupal/Core/Cache/DatabaseBackendFactory.php \Drupal\Core\Cache\DatabaseBackendFactory::__construct()

Constructs the DatabaseBackendFactory object.

Parameters

\Drupal\Core\Database\Connection $connection: Database connection

\Drupal\Core\Cache\CacheTagsChecksumInterface $checksum_provider: The cache tags checksum provider.

\Drupal\Core\Site\Settings $settings: (optional) The site settings.

Throws

\BadMethodCallException

File

core/lib/Drupal/Core/Cache/DatabaseBackendFactory.php, line 43

Class

DatabaseBackendFactory

Namespace

Drupal\Core\Cache

Code

public function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider, Settings $settings = NULL) {
    $this->connection = $connection;
    $this->checksumProvider = $checksum_provider;
    $this->settings = $settings ?: Settings::getInstance();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.