1 | <?php |
||
7 | final class EntryCache implements EntryCacheInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var array |
||
11 | */ |
||
12 | private $cache = []; |
||
13 | |||
14 | /** |
||
15 | * @param string $id |
||
16 | * @param array $entry |
||
17 | * |
||
18 | * @return EntryCacheInterface |
||
19 | */ |
||
20 | public function set(string $id, array $entry): EntryCacheInterface |
||
26 | |||
27 | /** |
||
28 | * @param string $id |
||
29 | * |
||
30 | * @return bool |
||
31 | */ |
||
32 | public function has(string $id): bool |
||
36 | |||
37 | /** |
||
38 | * @param string $id |
||
39 | * |
||
40 | * @return array |
||
41 | * |
||
42 | * @throws EntryNotFoundException |
||
43 | */ |
||
44 | public function get(string $id) |
||
52 | |||
53 | /** |
||
54 | * @param string $id |
||
55 | * |
||
56 | * @return EntryCacheInterface |
||
57 | */ |
||
58 | public function remove(string $id): EntryCacheInterface |
||
64 | |||
65 | /** |
||
66 | * @return EntryCacheInterface |
||
67 | */ |
||
68 | public function clear(): EntryCacheInterface |
||
74 | } |
||
75 |