public function valid()
    {
        if (!self::$session) {
            Exception::i()->setMessage(self::ERROR_NOT_STARTED)->trigger();
        }

        return isset($_SESSION[$this->key()]);
    }
public function valid()
    {
        if (!self::$session) {
            Exception::i()->setMessage(self::ERROR_NOT_STARTED)->trigger();
        }

        return isset($_SESSION[$this->key()]);
    }
public function valid ( ) { if ( ! self :: $ session ) { Exception :: i ( ) -> setMessage ( self :: ERROR_NOT_STARTED ) -> trigger ( ) ; } return isset ( $ _SESSION [ $ this -> key ( ) ] ) ; }
Validates whether if the index is set
For Iterator interface

@return bool
Validates whether if the index is set For Iterator interface