public function getQuery($toArray = false)
    {
        if ($toArray) {
            return $this->vars;
        }

        // If the query is empty build it first
        if (is_null($this->query)) {
            $this->query = UriHelper::buildQuery($this->vars);
        }

        return $this->query;
    }