public function removeValue($key)
    {
        if (!$this->isValid()) {
            throw new \LogicException('Session is in an invalid state.');
        }

        if ($this->storage->hasValue($key)) {
            $this->storage->removeValue($key);
            return true;
        }

        return false;
    }
public function removeValue($key)
    {
        if (!$this->isValid()) {
            throw new \LogicException('Session is in an invalid state.');
        }

        if ($this->storage->hasValue($key)) {
            $this->storage->removeValue($key);
            return true;
        }

        return false;
    }
public function removeValue ( $ key ) { if ( ! $ this -> isValid ( ) ) { throw new \ LogicException ( 'Session is in an invalid state.' ) ; } if ( $ this -> storage -> hasValue ( $ key ) ) { $ this -> storage -> removeValue ( $ key ) ; return true ; } return false ; }
removes a value from the session

@param   string  $key  key where value is stored under
@return  bool    true if value existed and was removed, else false
@throws  \LogicException
removes a value from the session