You are here

class KeyValueDatabaseExpirableFactory in Service Container 7.2

Same name in this branch
  1. 7.2 src/KeyValueStore/KeyValueDatabaseExpirableFactory.php \Drupal\service_container\KeyValueStore\KeyValueDatabaseExpirableFactory
  2. 7.2 lib/Drupal/Core/KeyValueStore/KeyValueDatabaseExpirableFactory.php \Drupal\Core\KeyValueStore\KeyValueDatabaseExpirableFactory
Same name and namespace in other branches
  1. 7 src/KeyValueStore/KeyValueDatabaseExpirableFactory.php \Drupal\service_container\KeyValueStore\KeyValueDatabaseExpirableFactory

@codeCoverageIgnore

Hierarchy

Expanded class hierarchy of KeyValueDatabaseExpirableFactory

File

src/KeyValueStore/KeyValueDatabaseExpirableFactory.php, line 13
Contains \Drupal\service_container\KeyValueStore\KeyValueDatabaseExpirableFactory.

Namespace

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

  /**
   * {@inheritdoc}
   */
  public function get($collection) {
    if (!isset($this->storages[$collection])) {
      $this->storages[$collection] = new DatabaseStorageExpirable($collection, $this->serializer, $this->connection);
    }
    return $this->storages[$collection];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
KeyValueDatabaseExpirableFactory::$connection protected property The database connection.
KeyValueDatabaseExpirableFactory::$serializer protected property The serialization class to use.
KeyValueDatabaseExpirableFactory::$storages protected property Holds references to each instantiation so they can be terminated.
KeyValueDatabaseExpirableFactory::garbageCollection public function Deletes expired items.
KeyValueDatabaseExpirableFactory::get public function Constructs a new expirable key/value store for a given collection name. Overrides KeyValueDatabaseExpirableFactory::get
KeyValueDatabaseExpirableFactory::__construct function Constructs this factory object.