Bluz\Session\Session::sessionExists PHP Method

sessionExists() public method

Does a session started and is it currently active?
public sessionExists ( ) : boolean
return boolean
    public function sessionExists()
    {
        $sid = defined('SID') ? constant('SID') : false;
        if ($sid !== false && $this->getId()) {
            return true;
        }
        if (headers_sent()) {
            return true;
        }
        return false;
    }