Пример #1
0
 /**
  * Get a variable. Access to sub-arrays is supported with key.subkey.
  *
  * @param   string  variable key
  * @param   mixed   default value returned if variable does not exist
  * @return  mixed   Variable data if key specified, otherwise array containing all session data.
  */
 public function get($key = FALSE, $default = FALSE)
 {
     if (empty($key)) {
         return $_SESSION;
     }
     $result = isset($_SESSION[$key]) ? $_SESSION[$key] : Lemon::key_string($_SESSION, $key);
     return $result === NULL ? $default : $result;
 }