123456789101112131415 |
- <?php
- class SessionWrapper {
- public function set($key, $value) {
- $_SESSION[$key] = $value;
- }
- public function get($key) {
- return $_SESSION[$key];
- }
- public function getDefault($key, $default) {
- return isset($_SESSION[$key]) ? $_SESSION[$key] : $default;
- }
- public function unsetKey($key) {
- unset($_SESSION[$key]);
- }
- }
|