function KeyValueStoreInterface::set
Same name in other branches
- 9 core/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php \Drupal\Core\KeyValueStore\KeyValueStoreInterface::set()
- 10 core/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php \Drupal\Core\KeyValueStore\KeyValueStoreInterface::set()
- 11.x core/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php \Drupal\Core\KeyValueStore\KeyValueStoreInterface::set()
Saves a value for a given key.
Parameters
string $key: The key of the data to store.
mixed $value: The data to store.
1 call to KeyValueStoreInterface::set()
- StorageBase::setMultiple in core/
lib/ Drupal/ Core/ KeyValueStore/ StorageBase.php - Saves key/value pairs.
3 methods override KeyValueStoreInterface::set()
- DatabaseStorage::set in core/
lib/ Drupal/ Core/ KeyValueStore/ DatabaseStorage.php - Saves a value for a given key.
- MemoryStorage::set in core/
lib/ Drupal/ Core/ KeyValueStore/ MemoryStorage.php - Saves a value for a given key.
- NullStorageExpirable::set in core/
lib/ Drupal/ Core/ KeyValueStore/ NullStorageExpirable.php - Saves a value for a given key.
File
-
core/
lib/ Drupal/ Core/ KeyValueStore/ KeyValueStoreInterface.php, line 71
Class
- KeyValueStoreInterface
- Defines the interface for key/value store implementations.
Namespace
Drupal\Core\KeyValueStoreCode
public function set($key, $value);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.