Bluz\Session\Session::destroy PHP Method

destroy() public method

Destroy/end a session
public destroy ( ) : void
return void
    public function destroy()
    {
        if (!$this->cookieExists() || !$this->sessionExists()) {
            return;
        }
        session_destroy();
        // send expire cookies
        $this->expireSessionCookie();
        // clear session data
        unset($_SESSION[$this->getNamespace()]);
    }