public function get($key, $default = null)
    {
        if (!$this->id) {
            throw new Exception('Cannot use get without active session.');
        }
        return array_key_exists($key, $this->data) ? $this->data[$key] : $default;
    }
public function get($key, $default = null)
    {
        if (!$this->id) {
            throw new Exception('Cannot use get without active session.');
        }
        return array_key_exists($key, $this->data) ? $this->data[$key] : $default;
    }
public function get ( $ key , $ default = null ) { if ( ! $ this -> id ) { throw new Exception ( 'Cannot use get without active session.' ) ; } return array_key_exists ( $ key , $ this -> data ) ? $ this -> data [ $ key ] : $ default ; }
Get a value from the session

@param string $key
@param mixed $default

@return mixed

@throws Exception
Get a value from the session