class NullStorageExpirable in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php \Drupal\Core\KeyValueStore\NullStorageExpirable
Defines a null key/value store implementation.
Hierarchy
- class \Drupal\Core\KeyValueStore\NullStorageExpirable implements KeyValueStoreExpirableInterface
Expanded class hierarchy of NullStorageExpirable
File
- core/
lib/ Drupal/ Core/ KeyValueStore/ NullStorageExpirable.php, line 8
Namespace
Drupal\Core\KeyValueStoreView source
class NullStorageExpirable implements KeyValueStoreExpirableInterface {
/**
* The actual storage of key-value pairs.
*
* @var array
*/
protected $data = [];
/**
* The name of the collection holding key and value pairs.
*
* @var string
*/
protected $collection;
/**
* Creates a new expirable null key/value store.
*/
public function __construct($collection) {
$this->collection = $collection;
}
/**
* {@inheritdoc}
*/
public function has($key) {
return FALSE;
}
/**
* {@inheritdoc}
*/
public function get($key, $default = NULL) {
return NULL;
}
/**
* {@inheritdoc}
*/
public function getMultiple(array $keys) {
return [];
}
/**
* {@inheritdoc}
*/
public function getAll() {
return [];
}
/**
* {@inheritdoc}
*/
public function set($key, $value) {
}
/**
* {@inheritdoc}
*/
public function setIfNotExists($key, $value) {
}
/**
* {@inheritdoc}
*/
public function setMultiple(array $data) {
}
/**
* {@inheritdoc}
*/
public function rename($key, $new_key) {
}
/**
* {@inheritdoc}
*/
public function delete($key) {
}
/**
* {@inheritdoc}
*/
public function deleteMultiple(array $keys) {
}
/**
* {@inheritdoc}
*/
public function deleteAll() {
}
/**
* {@inheritdoc}
*/
public function getCollectionName() {
return $this->collection;
}
/**
* {@inheritdoc}
*/
public function setMultipleWithExpire(array $data, $expire) {
}
/**
* {@inheritdoc}
*/
public function setWithExpire($key, $value, $expire) {
}
/**
* {@inheritdoc}
*/
public function setWithExpireIfNotExists($key, $value, $expire) {
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
NullStorageExpirable:: |
protected | property | The name of the collection holding key and value pairs. | |
NullStorageExpirable:: |
protected | property | The actual storage of key-value pairs. | |
NullStorageExpirable:: |
public | function |
Deletes an item from the key/value store. Overrides KeyValueStoreInterface:: |
|
NullStorageExpirable:: |
public | function |
Deletes all items from the key/value store. Overrides KeyValueStoreInterface:: |
|
NullStorageExpirable:: |
public | function |
Deletes multiple items from the key/value store. Overrides KeyValueStoreInterface:: |
|
NullStorageExpirable:: |
public | function |
Returns the stored value for a given key. Overrides KeyValueStoreInterface:: |
|
NullStorageExpirable:: |
public | function |
Returns all stored key/value pairs in the collection. Overrides KeyValueStoreInterface:: |
|
NullStorageExpirable:: |
public | function |
Returns the name of this collection. Overrides KeyValueStoreInterface:: |
|
NullStorageExpirable:: |
public | function |
Returns the stored key/value pairs for a given set of keys. Overrides KeyValueStoreInterface:: |
|
NullStorageExpirable:: |
public | function |
Returns whether a given key exists in the store. Overrides KeyValueStoreInterface:: |
|
NullStorageExpirable:: |
public | function |
Renames a key. Overrides KeyValueStoreInterface:: |
|
NullStorageExpirable:: |
public | function |
Saves a value for a given key. Overrides KeyValueStoreInterface:: |
|
NullStorageExpirable:: |
public | function |
Saves a value for a given key if it does not exist yet. Overrides KeyValueStoreInterface:: |
|
NullStorageExpirable:: |
public | function |
Saves key/value pairs. Overrides KeyValueStoreInterface:: |
|
NullStorageExpirable:: |
public | function |
Saves an array of values with a time to live. Overrides KeyValueStoreExpirableInterface:: |
|
NullStorageExpirable:: |
public | function |
Saves a value for a given key with a time to live. Overrides KeyValueStoreExpirableInterface:: |
|
NullStorageExpirable:: |
public | function |
Sets a value for a given key with a time to live if it does not yet exist. Overrides KeyValueStoreExpirableInterface:: |
|
NullStorageExpirable:: |
public | function | Creates a new expirable null key/value store. |