| 1 | <?php |
||
| 17 | class Cache |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected static $filename = '.phplint-cache'; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Fetch cache. |
||
| 26 | * |
||
| 27 | * @return mixed |
||
| 28 | */ |
||
| 29 | public static function get() |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Check cache exists. |
||
| 38 | * |
||
| 39 | * @return bool |
||
| 40 | */ |
||
| 41 | public static function exists() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Alias if exists();. |
||
| 48 | * |
||
| 49 | * @return bool |
||
| 50 | */ |
||
| 51 | public static function isCached() |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Set cache. |
||
| 58 | * |
||
| 59 | * @param mixed $contents |
||
| 60 | * |
||
| 61 | * @return int |
||
| 62 | */ |
||
| 63 | public static function put($contents) |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Set cache filename. |
||
| 70 | * |
||
| 71 | * @param string $filename |
||
| 72 | */ |
||
| 73 | public static function setFilename($filename) |
||
| 77 | |||
| 78 | /** |
||
| 79 | * Return cache filename. |
||
| 80 | * |
||
| 81 | * @return string |
||
| 82 | */ |
||
| 83 | public static function getFilename() |
||
| 87 | } |
||
| 88 |