public function setQuery($key, $value = null) {
        if (is_string($key)) {
            $this->env['QUERY'][$key] = $value;
        } elseif (is_array($key)) {
            $this->env['QUERY'] = $key;
        } else {
            throw new \InvalidArgumentException("Argument 1 must be a string or array.", 422);
        }
        return $this;
    }
public function setQuery($key, $value = null) {
        if (is_string($key)) {
            $this->env['QUERY'][$key] = $value;
        } elseif (is_array($key)) {
            $this->env['QUERY'] = $key;
        } else {
            throw new \InvalidArgumentException("Argument 1 must be a string or array.", 422);
        }
        return $this;
    }
public function setQuery ( $ key , $ value = null ) { if ( is_string ( $ key ) ) { $ this -> env [ 'QUERY' ] [ $ key ] = $ value ; } elseif ( is_array ( $ key ) ) { $ this -> env [ 'QUERY' ] = $ key ; } else { throw new \ InvalidArgumentException ( "Argument 1 must be a string or array." , 422 ) ; } return $ this ; }
Set an item from the query string array.

@param string|array $key Either a string key or an array to set the entire query string.
@param mixed|null $value The value to set.
@return Request Returns $this for fluent call.
@throws \InvalidArgumentException Throws an exception when {@link $key is invalid}.
@see Request::getQuery()
Set an item from the query string array .