function MemoryStorage::set

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php \Drupal\Core\KeyValueStore\MemoryStorage::set()
  2. 8.9.x core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php \Drupal\Core\KeyValueStore\MemoryStorage::set()
  3. 10 core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php \Drupal\Core\KeyValueStore\MemoryStorage::set()

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.