| Total Complexity | 9 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | class Session |
||
| 21 | { |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param $key |
||
| 25 | * @return bool |
||
| 26 | */ |
||
| 27 | public static function delete($key) |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * |
||
| 38 | */ |
||
| 39 | public static function destroy() |
||
| 40 | { |
||
| 41 | session_destroy(); |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param $key |
||
| 46 | * @return bool |
||
| 47 | */ |
||
| 48 | public static function exists($key) |
||
| 49 | { |
||
| 50 | return(isset($_SESSION[$key])); |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param $key |
||
| 55 | * @return mixed |
||
| 56 | */ |
||
| 57 | public static function get($key) |
||
| 61 | } |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * |
||
| 66 | */ |
||
| 67 | public static function init() |
||
| 68 | { |
||
| 69 | |||
| 70 | if (session_id() == "") { |
||
| 71 | session_start(); |
||
| 72 | } |
||
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @param $key |
||
| 77 | * @param $value |
||
| 78 | * @return mixed |
||
| 79 | */ |
||
| 80 | public static function put($key, $value) |
||
| 83 | } |
||
| 84 | } |
||
| 85 | |||
| 86 |