You are here

public function DatabaseBackendFactory::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Cache/DatabaseBackendFactory.php \Drupal\Core\Cache\DatabaseBackendFactory::__construct()
  2. 9 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();
}