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 | */ |
||
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 | |||
59 | /** |
||
60 | * Method to get a storage entry value from a key. |
||
61 | * |
||
62 | * @param string $key The storage entry identifier. |
||
63 | * |
||
64 | * @return CacheItemInterface |
||
65 | * |
||
66 | * @since 1.0 |
||
67 | */ |
||
68 | public function getItem($key) |
||
79 | |||
80 | /** |
||
81 | * Method to remove a storage entry for a key. |
||
82 | * |
||
83 | * @param string $key The storage entry identifier. |
||
84 | * |
||
85 | * @return boolean |
||
86 | * |
||
87 | * @since 1.0 |
||
88 | */ |
||
89 | public function deleteItem($key) |
||
99 | |||
100 | /** |
||
101 | * Method to set a value for a storage entry. |
||
102 | * |
||
103 | * @param CacheItemInterface $item The cache item to save. |
||
104 | * |
||
105 | * @return boolean |
||
106 | * |
||
107 | * @since 1.0 |
||
108 | */ |
||
109 | public function save(CacheItemInterface $item) |
||
115 | |||
116 | /** |
||
117 | * Method to determine whether a storage entry has been set for a key. |
||
118 | * |
||
119 | * @param string $key The storage entry identifier. |
||
120 | * |
||
121 | * @return boolean |
||
122 | * |
||
123 | * @since 1.0 |
||
124 | */ |
||
125 | public function hasItem($key) |
||
129 | |||
130 | /** |
||
131 | * Test to see if the CacheItemPoolInterface is available |
||
132 | * |
||
133 | * @return boolean True on success, false otherwise |
||
134 | * |
||
135 | * @since __DEPLOY_VERSION__ |
||
136 | */ |
||
137 | public static function isSupported() |
||
141 | } |
||
142 |