function TempStore::__construct

Constructs a new object for accessing data from a key/value store.

Parameters

KeyValueStoreExpireInterface $storage: The key/value storage object used for this data. Each storage object represents a particular collection of data and will contain any number of key/value pairs.

Drupal\Core\Lock\LockBackendInterface $lockBackend: The lock object used for this data.

mixed $owner: The owner key to store along with the data (e.g. a user or session ID).

File

drupal/core/modules/user/lib/Drupal/user/TempStore.php, line 88
Contains Drupal\user\TempStore.

Class

TempStore
Stores and retrieves temporary data for a given owner.

Namespace

Drupal\user

Code

function __construct(KeyValueStoreExpirableInterface $storage, LockBackendInterface $lockBackend, $owner) {
  $this->storage = $storage;
  $this->lockBackend = $lockBackend;
  $this->owner = $owner;
}