MemoryStorage::setMultiple

public MemoryStorage::setMultiple(array $data) Saves key/value pairs. Parameters array $data: An associative array of key/value pairs. Overrides StorageBase::setMultiple File core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php, line 66 Class MemoryStorage Defines a default key/value store implementation. Namespace Drupal\Core\KeyValueStore Code public function setMultiple(array $data) { $this->data = $data + $this->data; }

MemoryStorage::setIfNotExists

public MemoryStorage::setIfNotExists($key, $value) Saves a value for a given key if it does not exist yet. 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, FALSE if it already existed. Overrides KeyValueStoreInterface::setIfNotExists File core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php, line 55 Class MemoryStorage Defines a default key/value store implementation. Namespace Drupal\Core\KeyValueStore

MemoryStorage::set

public MemoryStorage::set($key, $value) Saves a value for a given key. Parameters string $key: The key of the data to store. mixed $value: The data to store. Overrides KeyValueStoreInterface::set File core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php, line 48 Class MemoryStorage Defines a default key/value store implementation. Namespace Drupal\Core\KeyValueStore Code public function set($key, $value) { $this->data[$key] = $value; }

MemoryStorage::rename

public MemoryStorage::rename($key, $new_key) Renames a key. Parameters string $key: The key to rename. string $new_key: The new key name. Overrides KeyValueStoreInterface::rename File core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php, line 73 Class MemoryStorage Defines a default key/value store implementation. Namespace Drupal\Core\KeyValueStore Code public function rename($key, $new_key) { $this->data[$new_key] = $this->data[$key]; unset($this->data[$key]); }

MemoryStorage::has

public MemoryStorage::has($key) Returns whether a given key exists in the store. Parameters string $key: The key to check. Return value bool TRUE if the key exists, FALSE otherwise. Overrides KeyValueStoreInterface::has File core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php, line 20 Class MemoryStorage Defines a default key/value store implementation. Namespace Drupal\Core\KeyValueStore Code public function has($key) { return array_key_exists($key, $this->data); }

MemoryStorage::getMultiple

public MemoryStorage::getMultiple(array $keys) Returns the stored key/value pairs for a given set of keys. @todo What's returned for non-existing keys? Parameters array $keys: A list of keys to retrieve. Return value array An associative array of items successfully returned, indexed by key. Overrides KeyValueStoreInterface::getMultiple File core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php, line 34 Class MemoryStorage Defines a default key/value store implementation. Namespace Drup

MemoryStorage::getAll

public MemoryStorage::getAll() Returns all stored key/value pairs in the collection. Return value array An associative array containing all stored items in the collection. Overrides KeyValueStoreInterface::getAll File core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php, line 41 Class MemoryStorage Defines a default key/value store implementation. Namespace Drupal\Core\KeyValueStore Code public function getAll() { return $this->data; }

MemoryStorage::get

public MemoryStorage::get($key, $default = NULL) Returns the stored value for a given key. Parameters string $key: The key of the data to retrieve. mixed $default: The default value to use if the key is not found. Return value mixed The stored value, or the default value if no value exists. Overrides StorageBase::get File core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php, line 27 Class MemoryStorage Defines a default key/value store implementation. Namespace Drupal\Core\KeyValueSto

MemoryStorage::deleteMultiple

public MemoryStorage::deleteMultiple(array $keys) Deletes multiple items from the key/value store. Parameters array $keys: A list of item names to delete. Overrides KeyValueStoreInterface::deleteMultiple File core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php, line 88 Class MemoryStorage Defines a default key/value store implementation. Namespace Drupal\Core\KeyValueStore Code public function deleteMultiple(array $keys) { foreach ($keys as $key) { unset($this->data[$key]);

MemoryStorage::deleteAll

public MemoryStorage::deleteAll() Deletes all items from the key/value store. Overrides KeyValueStoreInterface::deleteAll File core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php, line 97 Class MemoryStorage Defines a default key/value store implementation. Namespace Drupal\Core\KeyValueStore Code public function deleteAll() { $this->data = array(); }