| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 2 | Features | 0 |
| 1 | <?php defined('SYSPATH') or die('No direct access allowed.'); |
||
| 12 | interface Cache_Driver |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Set a cache item. |
||
| 17 | */ |
||
| 18 | public function set($id, $data, array $tags = null, $lifetime); |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Find all of the cache ids for a given tag. |
||
| 22 | */ |
||
| 23 | public function find($tag); |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Get a cache item. |
||
| 27 | * Return NULL if the cache item is not found. |
||
| 28 | */ |
||
| 29 | public function get($id); |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Delete cache items by id or tag. |
||
| 33 | */ |
||
| 34 | public function delete($id, $tag = false); |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Deletes all expired cache items. |
||
| 38 | * @return boolean|null |
||
| 39 | */ |
||
| 40 | public function delete_expired(); |
||
| 41 | } // End Cache Driver |
||
| 42 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@returndoc comment to communicate to implementors of these methods what they are expected to return.