1 | <?php |
||
29 | class Driver_APC extends Base |
||
30 | { |
||
31 | /** |
||
32 | * Creates the cache handler object |
||
33 | * |
||
34 | * @param array $config Configuration details as an array |
||
35 | * |
||
36 | * @throws \Exception |
||
37 | * |
||
38 | * @return \csphere\core\cache\Driver_APC |
||
39 | **/ |
||
40 | |||
41 | public function __construct(array $config) |
||
50 | |||
51 | /** |
||
52 | * Clears the cache content |
||
53 | * |
||
54 | * @return boolean |
||
55 | **/ |
||
56 | |||
57 | public function clear() |
||
74 | |||
75 | /** |
||
76 | * Removes a cached key |
||
77 | * |
||
78 | * @param string $key Name of the key |
||
79 | * @param int $ttl Time to life used for the key |
||
80 | * |
||
81 | * @return boolean |
||
82 | **/ |
||
83 | |||
84 | public function delete($key, $ttl = 0) |
||
95 | |||
96 | /** |
||
97 | * Returns a formatted array with statistics |
||
98 | * |
||
99 | * @return array |
||
100 | **/ |
||
101 | |||
102 | public function info() |
||
127 | |||
128 | /** |
||
129 | * Returns a formatted array with all keys and additional information |
||
130 | * |
||
131 | * @return array |
||
132 | **/ |
||
133 | |||
134 | public function keys() |
||
155 | |||
156 | /** |
||
157 | * Fetches the desired key |
||
158 | * |
||
159 | * @param string $key Name of the key |
||
160 | * @param int $ttl Time to life used for the key |
||
161 | * |
||
162 | * @return array |
||
163 | **/ |
||
164 | |||
165 | public function load($key, $ttl = 0) |
||
176 | |||
177 | /** |
||
178 | * Stores the key with its value in the cache |
||
179 | * |
||
180 | * @param string $key Name of the key |
||
181 | * @param array $value Content to be stored |
||
182 | * @param int $ttl Time to life used for the key |
||
183 | * |
||
184 | * @return boolean |
||
185 | **/ |
||
186 | |||
187 | public function save($key, $value, $ttl = 0) |
||
197 | } |
||
198 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.