public function clear():bool
    {
        if (true === $this->isStarted()) {
            session_unset();
            $this->setToDefault();
            session_regenerate_id(true);
            return (empty($_SESSION)? true : false);
        }
        throw new Server500(new \ArrayObject(array("explain" => "Cannot clear the session when is not started",
            "solution" => "Please start a session instance before clear it")));
    }
public function clear():bool
    {
        if (true === $this->isStarted()) {
            session_unset();
            $this->setToDefault();
            session_regenerate_id(true);
            return (empty($_SESSION)? true : false);
        }
        throw new Server500(new \ArrayObject(array("explain" => "Cannot clear the session when is not started",
            "solution" => "Please start a session instance before clear it")));
    }
public function clear ( ) : bool { if ( true === $ this -> isStarted ( ) ) { session_unset ( ) ; $ this -> setToDefault ( ) ; session_regenerate_id ( true ) ; return ( empty ( $ _SESSION ) ? true : false ) ; } throw new Server500 ( new \ ArrayObject ( array ( "explain" => "Cannot clear the session when is not started" , "solution" => "Please start a session instance before clear it" ) ) ) ; }
Clear the session
@return bool If session is clear properly or not
@throws Server500
Clear the session