| 1 | <?php |
||
| 12 | class File extends BaseDriver |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | const FILENAME_SUFFIX = '.key'; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $dir; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param string $dir |
||
| 26 | */ |
||
| 27 | 9 | public function __construct($dir) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @param string $key |
||
| 34 | * |
||
| 35 | * @return \DateTime|null |
||
| 36 | */ |
||
| 37 | 5 | public function get($key) |
|
| 46 | |||
| 47 | /** |
||
| 48 | * @param string $key |
||
| 49 | * @param \DateTime $time |
||
| 50 | * |
||
| 51 | * @return bool |
||
| 52 | */ |
||
| 53 | 6 | public function set($key, \DateTime $time) |
|
| 63 | |||
| 64 | /** |
||
| 65 | * @param string $key |
||
| 66 | * |
||
| 67 | * @return bool |
||
| 68 | */ |
||
| 69 | 3 | public function remove($key) |
|
| 78 | |||
| 79 | /** |
||
| 80 | * @param string $key |
||
| 81 | * |
||
| 82 | * @return string |
||
| 83 | */ |
||
| 84 | 8 | protected function getFilename($key) |
|
| 92 | } |
||
| 93 |