Nette\Http\Session::exists PHP Method

exists() public method

Does session exists for the current request?
public exists ( ) : boolean
return boolean
    public function exists()
    {
        return self::$started || $this->request->getCookie($this->getName()) !== NULL;
    }

Usage Example

Example #1
0
 /**
  * Determines whether a variable in this session section is set.
  * @param  string    name
  * @return bool
  */
 public function __isset($name)
 {
     if ($this->session->exists()) {
         $this->start();
     }
     return isset($this->data[$name]);
 }
All Usage Examples Of Nette\Http\Session::exists