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 | 6 | public function __construct(SessionManager $sessionManager) |
|
26 | |||
27 | /** |
||
28 | * Session start. |
||
29 | * |
||
30 | * @return $this |
||
31 | **/ |
||
32 | 1 | public function start() |
|
40 | |||
41 | /** |
||
42 | * Session write & close. |
||
43 | * |
||
44 | * @return $this |
||
45 | **/ |
||
46 | 1 | public function close() |
|
54 | |||
55 | /** |
||
56 | * Get session data. |
||
57 | * |
||
58 | * This method must be equipped with an automatic start / close. |
||
59 | * |
||
60 | * @param string $key |
||
61 | * @param mixed $default |
||
62 | * @return mixed |
||
63 | **/ |
||
64 | 1 | public function get($key, $default = '') |
|
68 | |||
69 | /** |
||
70 | * Set session data. |
||
71 | * |
||
72 | * This method must be equipped with an automatic start / close. |
||
73 | * |
||
74 | * @param string $key |
||
75 | * @param mixed $data |
||
76 | * @return $this |
||
77 | **/ |
||
78 | 1 | public function set($key, $data) |
|
84 | |||
85 | /** |
||
86 | * Get session data. |
||
87 | * |
||
88 | * @param string $key |
||
89 | * @return $this |
||
90 | **/ |
||
91 | 1 | public function remove($key) |
|
97 | } |
||
98 |