You are here

public function KeyValueStoreInterface::set in Service Container 7.2

Same name and namespace in other branches
  1. 7 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 lib/Drupal/Core/KeyValueStore/StorageBase.php
Implements Drupal\Core\KeyValueStore\KeyValueStoreInterface::setMultiple().
3 methods override KeyValueStoreInterface::set()
DatabaseStorage::set in lib/Drupal/Core/KeyValueStore/DatabaseStorage.php
Implements Drupal\Core\KeyValueStore\KeyValueStoreInterface::set().
MemoryStorage::set in lib/Drupal/Core/KeyValueStore/MemoryStorage.php
Implements Drupal\Core\KeyValueStore\KeyValueStoreInterface::set().
NullStorageExpirable::set in lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php
Implements Drupal\Core\KeyValueStore\KeyValueStoreInterface::set().

File

lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php, line 76
Contains \Drupal\Core\KeyValueStore\KeyValueStoreInterface.

Class

KeyValueStoreInterface
Defines the interface for key/value store implementations.

Namespace

Drupal\Core\KeyValueStore

Code

public function set($key, $value);