public function close($destroy = false)
    {
        if ($this->getIsActive()) {
            if (Reaction::isDebug()) {
                //Reaction::info('Session closed');
            }
            return $destroy || $this->isEmpty() ? $this->destroySession() : $this->writeSession();
        }
        $this->_isActive = false;
        return \Reaction\Promise\resolve(true);
    }
public function close($destroy = false)
    {
        if ($this->getIsActive()) {
            if (Reaction::isDebug()) {
                //Reaction::info('Session closed');
            }
            return $destroy || $this->isEmpty() ? $this->destroySession() : $this->writeSession();
        }
        $this->_isActive = false;
        return \Reaction\Promise\resolve(true);
    }
public function close ( $ destroy = false ) { if ( $ this -> getIsActive ( ) ) { if ( Reaction :: isDebug ( ) ) { //Reaction::info('Session closed'); } return $ destroy || $ this -> isEmpty ( ) ? $ this -> destroySession ( ) : $ this -> writeSession ( ) ; } $ this -> _isActive = false ; return \ Reaction \ Promise \ resolve ( true ) ; }
Ends the current session and store session data.
@param bool $destroy
@return ExtendedPromiseInterface
Ends the current session and store session data .