1 | <?php |
||
19 | class Runtime extends Cache |
||
20 | { |
||
21 | /** |
||
22 | * @var \ArrayObject Database of cached items, we use ArrayObject so it can be easily |
||
23 | * passed by reference |
||
24 | * |
||
25 | * @since 2.0 |
||
26 | */ |
||
27 | private $db; |
||
28 | |||
29 | /** |
||
30 | * Constructor. |
||
31 | * |
||
32 | * @param mixed $options An options array, or an object that implements \ArrayAccess |
||
33 | * |
||
34 | * @since 2.0 |
||
35 | * @throws \RuntimeException |
||
36 | 1 | */ |
|
37 | public function __construct($options = array()) |
||
42 | |||
43 | /** |
||
44 | * This will wipe out the entire cache's keys |
||
45 | * |
||
46 | * @return boolean The result of the clear operation. |
||
47 | * |
||
48 | * @since 1.0 |
||
49 | */ |
||
50 | public function clear() |
||
58 | 1 | ||
59 | 1 | /** |
|
60 | * Method to get a storage entry value from a key. |
||
61 | 1 | * |
|
62 | * @param string $key The storage entry identifier. |
||
63 | * |
||
64 | * @return CacheItemInterface |
||
65 | * |
||
66 | * @since 1.0 |
||
67 | */ |
||
68 | public function getItem($key) |
||
92 | |||
93 | /** |
||
94 | * Method to remove a storage entry for a key. |
||
95 | * |
||
96 | * @param string $key The storage entry identifier. |
||
97 | * |
||
98 | * @return boolean |
||
99 | * |
||
100 | * @since 1.0 |
||
101 | */ |
||
102 | public function deleteItem($key) |
||
117 | |||
118 | /** |
||
119 | * Method to set a value for a storage entry. |
||
120 | * |
||
121 | * @param CacheItemInterface $item The cache item to save. |
||
122 | * |
||
123 | * @return boolean |
||
124 | * |
||
125 | * @since 1.0 |
||
126 | */ |
||
127 | public function save(CacheItemInterface $item) |
||
133 | |||
134 | /** |
||
135 | * Method to determine whether a storage entry has been set for a key. |
||
136 | * |
||
137 | * @param string $key The storage entry identifier. |
||
138 | * |
||
139 | * @return boolean |
||
140 | * |
||
141 | * @since 1.0 |
||
142 | */ |
||
143 | public function hasItem($key) |
||
147 | |||
148 | /** |
||
149 | * Test to see if the CacheItemPoolInterface is available |
||
150 | * |
||
151 | * @return boolean True on success, false otherwise |
||
152 | * |
||
153 | * @since __DEPLOY_VERSION__ |
||
154 | */ |
||
155 | public static function isSupported() |
||
159 | } |
||
160 |