class KeyValueDatabaseExpirableFactory

Defines the key/value store factory for the database backend.

Hierarchy

Expanded class hierarchy of KeyValueDatabaseExpirableFactory

File

drupal/core/lib/Drupal/Core/KeyValueStore/KeyValueDatabaseExpirableFactory.php, line 17
Contains Drupal\Core\KeyValueStore\KeyValueDatabaseExpirableFactory.

Namespace

Drupal\Core\KeyValueStore
View source
class KeyValueDatabaseExpirableFactory extends KeyValueDatabaseFactory {

  /**
   * Constructs a new key/value expirable 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\DatabaseStorageExpirable
   *   A key/value store implementation for the given $collection.
   */
  public function get($collection) {
    return new DatabaseStorageExpirable($collection, $this->connection);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
KeyValueDatabaseExpirableFactory::get public function Constructs a new key/value expirable database storage object for a given collection name. Overrides KeyValueDatabaseFactory::get
KeyValueDatabaseFactory::__construct function Constructs this factory object.