1 | <?php |
||
26 | class Session |
||
27 | { |
||
28 | /* |
||
29 | |-------------------------------------------------------------------------- |
||
30 | | Session Class |
||
31 | |-------------------------------------------------------------------------- |
||
32 | | |
||
33 | | For Fetching the sidebar results. |
||
34 | | |
||
35 | */ |
||
36 | |||
37 | /** |
||
38 | * Create Key-Value pain in session storage |
||
39 | * |
||
40 | * @param int $key To store key for the value |
||
41 | * @param int $value To store value for the corresponding key |
||
42 | * |
||
43 | * @return void |
||
44 | */ |
||
45 | public static function put($key, $value) |
||
49 | |||
50 | /** |
||
51 | * Get Value from the session storage |
||
52 | * |
||
53 | * @param int $key To store key for the value |
||
54 | * |
||
55 | * @return string or null |
||
56 | */ |
||
57 | public static function get($key) |
||
61 | |||
62 | /** |
||
63 | * Destroy key-value pair from the session storage |
||
64 | * |
||
65 | * @param int $key To store key for the value |
||
66 | * |
||
67 | * @return void |
||
68 | */ |
||
69 | public static function forget($key) |
||
73 | |||
74 | } |
||
75 |
If you suppress an error, we recommend checking for the error condition explicitly: