| 1 | <?php |
||
| 4 | class FileStore implements StoreInterface |
||
| 5 | { |
||
| 6 | /** @var string */ |
||
| 7 | protected $dir; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @param string |
||
| 11 | */ |
||
| 12 | public function __construct($dir) |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param string $id |
||
| 19 | * @return bool|mixed |
||
| 20 | */ |
||
| 21 | public function fetch($id) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param string $id |
||
| 42 | * @param mixed $data |
||
| 43 | * @param int $lifeTime |
||
| 44 | * @return int |
||
| 45 | */ |
||
| 46 | public function save($id, $data, $lifeTime) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param string $id |
||
| 58 | * @return bool |
||
| 59 | */ |
||
| 60 | public function delete($id) |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @param string $id |
||
| 67 | * @return string |
||
| 68 | */ |
||
| 69 | protected function getFileName($id) |
||
| 73 | } |
||
| 74 |