public function KeyValueDatabaseFactory::get in Service Container 7
Same name and namespace in other branches
- 7.2 lib/Drupal/Core/KeyValueStore/KeyValueDatabaseFactory.php \Drupal\Core\KeyValueStore\KeyValueDatabaseFactory::get()
Constructs a new key/value store for a given collection name.
Parameters
string $collection: The name of the collection holding key and value pairs.
Return value
\Drupal\Core\KeyValueStore\KeyValueStoreInterface A key/value store implementation for the given $collection.
Overrides KeyValueFactoryInterface::get
File
- lib/
Drupal/ Core/ KeyValueStore/ KeyValueDatabaseFactory.php, line 49 - Contains \Drupal\Core\KeyValueStore\KeyValueDatabaseFactory.
Class
- KeyValueDatabaseFactory
- Defines the key/value store factory for the database backend.
Namespace
Drupal\Core\KeyValueStoreCode
public function get($collection) {
return new DatabaseStorage($collection, $this->serializer, $this->connection);
}