1 | <?php |
||
12 | class AdapterArray implements iAdapter |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | private static $values = []; |
||
19 | |||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | private static $expired = []; |
||
24 | |||
25 | /** |
||
26 | * @inheritdoc |
||
27 | */ |
||
28 | 6 | public function exists(string $key): bool |
|
34 | |||
35 | /** |
||
36 | * @inheritdoc |
||
37 | */ |
||
38 | 5 | public function get(string $key) |
|
42 | |||
43 | /** |
||
44 | * @inheritdoc |
||
45 | */ |
||
46 | public function installed(): bool |
||
50 | |||
51 | /** |
||
52 | * @inheritdoc |
||
53 | */ |
||
54 | public function remove(string $key): bool |
||
66 | |||
67 | /** |
||
68 | * @inheritdoc |
||
69 | */ |
||
70 | public function removeAll(): bool |
||
77 | |||
78 | /** |
||
79 | * @inheritdoc |
||
80 | */ |
||
81 | 3 | public function set(string $key, $value): bool |
|
87 | |||
88 | /** |
||
89 | * @inheritdoc |
||
90 | */ |
||
91 | 1 | public function setExpired(string $key, $value, int $ttl = 0): bool |
|
101 | |||
102 | /** |
||
103 | * Remove expired cache. |
||
104 | * |
||
105 | * @param string $key |
||
106 | * |
||
107 | * @return bool |
||
108 | */ |
||
109 | 6 | private function removeExpired($key): bool |
|
131 | |||
132 | } |
||
133 |