function DatabaseStorage::__construct
Same name in this branch
- 10 core/lib/Drupal/Core/Config/DatabaseStorage.php \Drupal\Core\Config\DatabaseStorage::__construct()
Same name in other branches
- 9 core/lib/Drupal/Core/Config/DatabaseStorage.php \Drupal\Core\Config\DatabaseStorage::__construct()
- 9 core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php \Drupal\Core\KeyValueStore\DatabaseStorage::__construct()
- 8.9.x core/lib/Drupal/Core/Config/DatabaseStorage.php \Drupal\Core\Config\DatabaseStorage::__construct()
- 8.9.x core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php \Drupal\Core\KeyValueStore\DatabaseStorage::__construct()
- 11.x core/lib/Drupal/Core/Config/DatabaseStorage.php \Drupal\Core\Config\DatabaseStorage::__construct()
- 11.x core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php \Drupal\Core\KeyValueStore\DatabaseStorage::__construct()
Overrides Drupal\Core\KeyValueStore\StorageBase::__construct().
Parameters
string $collection: The name of the collection holding key and value pairs.
\Drupal\Component\Serialization\SerializationInterface $serializer: The serialization class to use.
\Drupal\Core\Database\Connection $connection: The database connection to use.
string $table: The name of the SQL table to use, defaults to key_value.
Overrides StorageBase::__construct
1 call to DatabaseStorage::__construct()
- DatabaseStorageExpirable::__construct in core/
lib/ Drupal/ Core/ KeyValueStore/ DatabaseStorageExpirable.php - Overrides Drupal\Core\KeyValueStore\StorageBase::__construct().
1 method overrides DatabaseStorage::__construct()
- DatabaseStorageExpirable::__construct in core/
lib/ Drupal/ Core/ KeyValueStore/ DatabaseStorageExpirable.php - Overrides Drupal\Core\KeyValueStore\StorageBase::__construct().
File
-
core/
lib/ Drupal/ Core/ KeyValueStore/ DatabaseStorage.php, line 54
Class
- DatabaseStorage
- Defines a default key/value store implementation.
Namespace
Drupal\Core\KeyValueStoreCode
public function __construct($collection, SerializationInterface $serializer, Connection $connection, $table = 'key_value') {
parent::__construct($collection);
$this->serializer = $serializer;
$this->connection = $connection;
$this->table = $table;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.