| 1 | <?php |
||
| 10 | final class Session extends Singleton |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Rename the Session ID. |
||
| 14 | * |
||
| 15 | * @param string $name |
||
| 16 | */ |
||
| 17 | public function rename($name) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Start Session Handler. |
||
| 24 | */ |
||
| 25 | public function start() |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Stop Session Handler. |
||
| 32 | */ |
||
| 33 | public function destroy() |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Store a Variable in the Session. |
||
| 40 | * |
||
| 41 | * @param string $key |
||
| 42 | * @param mixed $value |
||
| 43 | * |
||
| 44 | * @return mixed |
||
| 45 | */ |
||
| 46 | public function set($key, $value) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Get a Attribute Value from Session. |
||
| 55 | * |
||
| 56 | * @param string $key |
||
| 57 | * |
||
| 58 | * @return mixed |
||
| 59 | */ |
||
| 60 | public function get($key) |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Check if a Key exists in the Session. |
||
| 67 | * |
||
| 68 | * @param mixed $key |
||
| 69 | * |
||
| 70 | * @return bool |
||
| 71 | */ |
||
| 72 | public function has($key) |
||
| 76 | |||
| 77 | /** |
||
| 78 | * Erase a Attribute from Session. |
||
| 79 | * |
||
| 80 | * @param string $key |
||
| 81 | */ |
||
| 82 | public function erase($key) |
||
| 88 | } |
||
| 89 |
If you suppress an error, we recommend checking for the error condition explicitly: