1 | <?php |
||
13 | class SessionHelper { |
||
14 | |||
15 | const SESSION_STORAGE = 'data-tables.'; |
||
16 | |||
17 | /** |
||
18 | * @param Request $request |
||
19 | * @param string $key |
||
20 | * @return string |
||
21 | */ |
||
22 | 3 | private static function getFormattedKey(Request $request, string $key) |
|
33 | |||
34 | /** |
||
35 | * @param Request $request |
||
36 | * @param string $key |
||
37 | * @param mixed $sessionValue |
||
38 | */ |
||
39 | 2 | public static function saveState(Request $request, string $key, $sessionValue) |
|
43 | |||
44 | /** |
||
45 | * @param Request $request |
||
46 | * @param string $key |
||
47 | * @param null $default |
||
48 | * @return mixed |
||
49 | */ |
||
50 | 3 | public static function getState(Request $request, string $key, $default = null) |
|
54 | |||
55 | /** |
||
56 | * @param Request $request |
||
57 | * @param string $key |
||
58 | */ |
||
59 | 1 | public static function removeState(Request $request, string $key) |
|
63 | } |