SharedTempStoreFactory::$storageFactory

The storage factory creating the backend to store the data. Type: \Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface File core/modules/user/src/SharedTempStoreFactory.php, line 19 Class SharedTempStoreFactory Creates a shared temporary storage for a collection. Namespace Drupal\user Code protected $storageFactory;

SharedTempStoreFactory::$requestStack

The request stack. Type: \Symfony\Component\HttpFoundation\RequestStack File core/modules/user/src/SharedTempStoreFactory.php, line 33 Class SharedTempStoreFactory Creates a shared temporary storage for a collection. Namespace Drupal\user Code protected $requestStack;

SharedTempStoreFactory::$lockBackend

The lock object used for this data. Type: \Drupal\Core\Lock\LockBackendInterface $lockBackend File core/modules/user/src/SharedTempStoreFactory.php, line 26 Class SharedTempStoreFactory Creates a shared temporary storage for a collection. Namespace Drupal\user Code protected $lockBackend;

SharedTempStoreFactory::$expire

The time to live for items in seconds. Type: int File core/modules/user/src/SharedTempStoreFactory.php, line 40 Class SharedTempStoreFactory Creates a shared temporary storage for a collection. Namespace Drupal\user Code protected $expire;

SharedTempStoreFactory

Creates a shared temporary storage for a collection. Hierarchy class \Drupal\user\SharedTempStoreFactory File core/modules/user/src/SharedTempStoreFactory.php, line 12 Namespace Drupal\user Members Name Modifiers Type Description SharedTempStoreFactory::$expire protected property The time to live for items in seconds. SharedTempStoreFactory::$lockBackend protected property The lock object used for this data. SharedTempStoreFactory::$requestStack protected p

SharedTempStore::__construct

public SharedTempStore::__construct(KeyValueStoreExpirableInterface $storage, LockBackendInterface $lock_backend, $owner, RequestStack $request_stack, $expire = 604800) Constructs a new object for accessing data from a key/value store. Parameters KeyValueStoreExpirableInterface $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 $lock_back

SharedTempStore::setIfOwner

public SharedTempStore::setIfOwner($key, $value) Stores a particular key/value pair in this SharedTempStore. Only stores the given key/value pair if it does not exist yet or is owned by $this->owner. Parameters string $key: The key of the data to store. mixed $value: The data to store. Return value bool TRUE if the data was set, or FALSE if it already exists and is not owned by $this->user. File core/modules/user/src/SharedTempStore.php, line 168 Class SharedTempStore Stores and re

SharedTempStore::setIfNotExists

public SharedTempStore::setIfNotExists($key, $value) Stores a particular key/value pair only if the key doesn't already exist. Parameters string $key: The key of the data to check and store. mixed $value: The data to store. Return value bool TRUE if the data was set, or FALSE if it already existed. File core/modules/user/src/SharedTempStore.php, line 144 Class SharedTempStore Stores and retrieves temporary data for a given owner. Namespace Drupal\user Code public function setIfNotExi

SharedTempStore::set

public SharedTempStore::set($key, $value) Stores a particular key/value pair in this SharedTempStore. Parameters string $key: The key of the data to store. mixed $value: The data to store. File core/modules/user/src/SharedTempStore.php, line 189 Class SharedTempStore Stores and retrieves temporary data for a given owner. Namespace Drupal\user Code public function set($key, $value) { if (!$this->lockBackend->acquire($key)) { $this->lockBackend->wait($key); if (!$t

SharedTempStore::getMetadata

public SharedTempStore::getMetadata($key) Returns the metadata associated with a particular key/value pair. Parameters string $key: The key of the data to store. Return value mixed An object with the owner and updated time if the key has a value, or NULL otherwise. File core/modules/user/src/SharedTempStore.php, line 216 Class SharedTempStore Stores and retrieves temporary data for a given owner. Namespace Drupal\user Code public function getMetadata($key) { // Fetch the key/value