| 1 | <?php |
||
| 14 | class Cache |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected static $filename = '.phplint-cache'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Fetch cache. |
||
| 23 | * |
||
| 24 | * @return mixed |
||
| 25 | */ |
||
| 26 | public static function get() |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Check cache exists. |
||
| 35 | * |
||
| 36 | * @return bool |
||
| 37 | */ |
||
| 38 | public static function exists() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Alias if exists();. |
||
| 45 | * |
||
| 46 | * @return bool |
||
| 47 | */ |
||
| 48 | public static function isCached() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Set cache. |
||
| 55 | * |
||
| 56 | * @param mixed $contents |
||
| 57 | */ |
||
| 58 | public static function put($contents) |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Return cache filename. |
||
| 65 | * |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | public static function getFilename() |
||
| 72 | } |
||
| 73 |