Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / KeyValueStore / NullStorageExpirable.php
1 <?php
2
3 namespace Drupal\Core\KeyValueStore;
4
5 /**
6  * Defines a null key/value store implementation.
7  */
8 class NullStorageExpirable implements KeyValueStoreExpirableInterface {
9
10   /**
11    * The actual storage of key-value pairs.
12    *
13    * @var array
14    */
15   protected $data = [];
16
17   /**
18    * The name of the collection holding key and value pairs.
19    *
20    * @var string
21    */
22   protected $collection;
23
24   /**
25    * Creates a new expirable null key/value store.
26    */
27   public function __construct($collection) {
28     $this->collection = $collection;
29   }
30
31   /**
32    * {@inheritdoc}
33    */
34   public function has($key) {
35     return FALSE;
36   }
37
38   /**
39    * {@inheritdoc}
40    */
41   public function get($key, $default = NULL) {
42     return NULL;
43   }
44
45   /**
46    * {@inheritdoc}
47    */
48   public function getMultiple(array $keys) {
49     return [];
50   }
51
52   /**
53    * {@inheritdoc}
54    */
55   public function getAll() {
56     return [];
57   }
58
59   /**
60    * {@inheritdoc}
61    */
62   public function set($key, $value) {}
63
64   /**
65    * {@inheritdoc}
66    */
67   public function setIfNotExists($key, $value) {}
68
69   /**
70    * {@inheritdoc}
71    */
72   public function setMultiple(array $data) {}
73
74   /**
75    * {@inheritdoc}
76    */
77   public function rename($key, $new_key) {
78   }
79
80   /**
81    * {@inheritdoc}
82    */
83   public function delete($key) {}
84
85   /**
86    * {@inheritdoc}
87    */
88   public function deleteMultiple(array $keys) {}
89
90   /**
91    * {@inheritdoc}
92    */
93   public function deleteAll() {}
94
95   /**
96    * {@inheritdoc}
97    */
98   public function getCollectionName() {
99     return $this->collection;
100   }
101
102   /**
103    * {@inheritdoc}
104    */
105   public function setMultipleWithExpire(array $data, $expire) {}
106
107   /**
108    * {@inheritdoc}
109    */
110   public function setWithExpire($key, $value, $expire) {}
111
112   /**
113    * {@inheritdoc}
114    */
115   public function setWithExpireIfNotExists($key, $value, $expire) {}
116
117 }