1 | <?php |
||
17 | class File extends Storage implements Cleanable |
||
18 | { |
||
19 | /** |
||
20 | * The path to which the session files should be written. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | private $path; |
||
25 | |||
26 | /** |
||
27 | * @param string $path |
||
28 | */ |
||
29 | public function __construct($path) |
||
33 | |||
34 | /** |
||
35 | * Load a session from storage by a given ID. |
||
36 | * |
||
37 | * @param string $key |
||
38 | * |
||
39 | * @return array|mixed|null |
||
40 | */ |
||
41 | public function load($key) |
||
49 | |||
50 | /** |
||
51 | * Save a given session to storage. |
||
52 | * |
||
53 | * @param array $session |
||
54 | * @param array $config |
||
55 | * @param bool $exists |
||
56 | */ |
||
57 | public function save($session, $config, $exists) |
||
61 | |||
62 | /** |
||
63 | * @param string $key |
||
64 | */ |
||
65 | public function delete($key) |
||
71 | |||
72 | /** |
||
73 | * Delete all expired sessions from persistent storage. |
||
74 | * |
||
75 | * @param int $expiration |
||
76 | * |
||
77 | * @return mixed|void |
||
78 | */ |
||
79 | public function clean($expiration) |
||
93 | } |
||
94 |