public function SharedTempStore::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/user/src/SharedTempStore.php \Drupal\user\SharedTempStore::__construct()
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 $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).
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
int $expire: The time to live for items, in seconds.
File
- core/
modules/ user/ src/ SharedTempStore.php, line 98 - Contains \Drupal\user\SharedTempStore.
Class
- SharedTempStore
- Stores and retrieves temporary data for a given owner.
Namespace
Drupal\userCode
public function __construct(KeyValueStoreExpirableInterface $storage, LockBackendInterface $lockBackend, $owner, RequestStack $request_stack, $expire = 604800) {
$this->storage = $storage;
$this->lockBackend = $lockBackend;
$this->owner = $owner;
$this->requestStack = $request_stack;
$this->expire = $expire;
}