Defines the key/value store factory for the database backend.
Expanded class hierarchy of KeyValueDatabaseFactory
class KeyValueDatabaseFactory {
/**
* Constructs this factory object.
*
*
* @param \Drupal\Core\Database\Connection $connection
* The Connection object containing the key-value tables.
*/
function __construct(Connection $connection) {
$this->connection = $connection;
}
/**
* Constructs a new key/value database storage object for a given collection name.
*
* @param string $collection
* The name of the collection holding key and value pairs.
* @param \Drupal\Core\Database\Connection $connection
* The connection to run against.
* @return \Drupal\Core\KeyValueStore\DatabaseStorage
* A key/value store implementation for the given $collection.
*/
public function get($collection) {
return new DatabaseStorage($collection, $this->connection);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
KeyValueDatabaseFactory:: |
public | function | Constructs a new key/value database storage object for a given collection name. | 1 |
KeyValueDatabaseFactory:: |
function | Constructs this factory object. |