1 | <?php |
||
20 | class Runtime extends AbstractCacheItemPool |
||
21 | { |
||
22 | /** |
||
23 | * Database of cached items, we use ArrayObject so it can be easily passed by reference |
||
24 | * |
||
25 | * @var \ArrayObject |
||
26 | * @since __DEPLOY_VERSION__ |
||
27 | */ |
||
28 | private $db; |
||
29 | |||
30 | /** |
||
31 | * Constructor. |
||
32 | * |
||
33 | * @param mixed $options An options array, or an object that implements \ArrayAccess |
||
34 | * |
||
35 | * @since __DEPLOY_VERSION__ |
||
36 | * @throws \RuntimeException |
||
37 | */ |
||
38 | 11 | public function __construct($options = array()) |
|
43 | |||
44 | /** |
||
45 | * This will wipe out the entire cache's keys |
||
46 | * |
||
47 | * @return boolean The result of the clear operation. |
||
48 | * |
||
49 | * @since 1.0 |
||
50 | */ |
||
51 | 11 | public function clear() |
|
59 | |||
60 | /** |
||
61 | * Method to get a storage entry value from a key. |
||
62 | * |
||
63 | * @param string $key The storage entry identifier. |
||
64 | * |
||
65 | * @return CacheItemInterface |
||
66 | * |
||
67 | * @since 1.0 |
||
68 | */ |
||
69 | 4 | public function getItem($key) |
|
80 | |||
81 | /** |
||
82 | * Method to remove a storage entry for a key. |
||
83 | * |
||
84 | * @param string $key The storage entry identifier. |
||
85 | * |
||
86 | * @return boolean |
||
87 | * |
||
88 | * @since 1.0 |
||
89 | */ |
||
90 | 2 | public function deleteItem($key) |
|
100 | |||
101 | /** |
||
102 | * Method to set a value for a storage entry. |
||
103 | * |
||
104 | * @param CacheItemInterface $item The cache item to save. |
||
105 | * |
||
106 | * @return boolean |
||
107 | * |
||
108 | * @since 1.0 |
||
109 | */ |
||
110 | 8 | public function save(CacheItemInterface $item) |
|
116 | |||
117 | /** |
||
118 | * Method to determine whether a storage entry has been set for a key. |
||
119 | * |
||
120 | * @param string $key The storage entry identifier. |
||
121 | * |
||
122 | * @return boolean |
||
123 | * |
||
124 | * @since 1.0 |
||
125 | */ |
||
126 | 8 | public function hasItem($key) |
|
130 | |||
131 | /** |
||
132 | * Test to see if the CacheItemPoolInterface is available |
||
133 | * |
||
134 | * @return boolean True on success, false otherwise |
||
135 | * |
||
136 | * @since __DEPLOY_VERSION__ |
||
137 | */ |
||
138 | public static function isSupported() |
||
142 | } |
||
143 |