Nette\Http\Session::isStarted PHP Method

isStarted() public method

Has been session started?
public isStarted ( ) : boolean
return boolean
    public function isStarted()
    {
        return (bool) self::$started;
    }

Usage Example

 /**
  * Html code for DebugerBar Panel
  * @author Pavel Železný <*****@*****.**>
  * @return string
  */
 public function getPanel()
 {
     $template = $this->getFileTemplate(__DIR__ . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'panel.latte');
     $template->session = $this->session->isStarted() ? $this->session : FALSE;
     $template->sessionMetaStore = isset($_SESSION['__NF']['META']) ? $_SESSION['__NF']['META'] : array();
     $template->sessionMaxTime = ini_get('session.gc_maxlifetime');
     $template->hiddenSections = $this->hiddenSections;
     return $template;
 }
All Usage Examples Of Nette\Http\Session::isStarted