}
// }}}
-// {{{ class Session
-
-class Session
-{
- // {{{ function _get
-
- function _get($key, $default)
- {
- return isset($_SESSION[$key]) ? $_SESSION[$key] : $default;
- }
-
- // }}}
- // {{{ function has
-
- function has($key)
- {
- return isset($_SESSION[$key]);
- }
-
- // }}}
- // {{{ function kill
-
- function kill($key)
- {
- unset($_SESSION[$key]);
- }
-
- // }}}
- // {{{ function get
-
- function get($key, $default='')
- {
- return (string)Session::_get($key, $default);
- }
-
- // }}}
- // {{{ function &getMixed
-
- function &getMixed($key, $default=null)
- {
- return Session::_get($key, $default);
- }
-
- // }}}
- // {{{ function getBool
-
- function getBool($key, $default=false)
- {
- return (bool)Session::_get($key, $default);
- }
-
- // }}}
- // {{{ function getInt
-
- function getInt($key, $default=0)
- {
- $i = Session::_get($key, $default);
- return preg_match(',^[0-9]+$,', $i) ? intval($i) : $default;
- }
-
- // }}}
-}
-
-// }}}
// {{{ class Cookie
class Cookie