1 | <?php |
||
8 | class LaravelSession implements elFinderSessionInterface |
||
9 | { |
||
10 | /** |
||
11 | * $session. |
||
12 | * |
||
13 | * @var \Illuminate\Session\SessionInterface |
||
14 | */ |
||
15 | protected $session; |
||
16 | |||
17 | /** |
||
18 | * __construct. |
||
19 | * |
||
20 | * @param \Illuminate\Session\SessionManager $sessionManager |
||
21 | */ |
||
22 | 1 | public function __construct(SessionManager $sessionManager) |
|
26 | |||
27 | /** |
||
28 | * Session start. |
||
29 | * |
||
30 | * @return $this |
||
31 | **/ |
||
32 | public function start() |
||
38 | |||
39 | /** |
||
40 | * Session write & close. |
||
41 | * |
||
42 | * @return $this |
||
43 | **/ |
||
44 | public function close() |
||
50 | |||
51 | /** |
||
52 | * Get session data. |
||
53 | * |
||
54 | * This method must be equipped with an automatic start / close. |
||
55 | * |
||
56 | * @param string $key |
||
57 | * @param mixed $empty |
||
58 | * @return mixed |
||
59 | **/ |
||
60 | public function get($key, $empty = '') |
||
64 | |||
65 | /** |
||
66 | * Set session data. |
||
67 | * |
||
68 | * This method must be equipped with an automatic start / close. |
||
69 | * |
||
70 | * @param string $key |
||
71 | * @param mixed $data |
||
72 | * @return $this |
||
73 | **/ |
||
74 | public function set($key, $data) |
||
80 | |||
81 | /** |
||
82 | * Get session data. |
||
83 | * |
||
84 | * @param string $key |
||
85 | * @return $this |
||
86 | **/ |
||
87 | public function remove($key) |
||
93 | } |
||
94 |