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;
    }