Get the full URL for the request with the added query string parameters.

@param array $query

@return string
979661
public function fullUrlWithQuery(array $query)
    {
        parse_str($this->getUri()->getQuery(), $queryParts);

        return (string) $this->getUri()
            ->withQuery(http_build_query($query + $queryParts));
    }
350203
public function api($method, array $query = array())
    {
        /* Generate query string from array */
        foreach ($query as $param => $value) {
            if (is_array($value)) {
                // implode values of each nested array with comma
                $query[$param] = implode(',', $value);
            }
        }
        $query['access_token'] = isset($this->accessToken['access_token'])
            ? $this->accessToken['access_token']
            : '';
        if (empty($query['v'])) {
            $query['v'] = $this->getApiVersion();
        }
        $url = 'https://api.vk.com/method/' . $method . '?' . http_build_query($query);
        $result = json_decode($this->curl($url), true);

        if (isset($result['response'])) {
            return $result['response'];
        }

        return $result;
    }
1153057
public function search($query, bool $full = false): stdClass
	{
		$res = $this->request('search/tweets', 'GET', is_array($query) ? $query : ['q' => $query]);
		return $full ? $res : $res->statuses;
	}
699439
public function full_url() {
		$query = $this->getQueryString();

		$question = ( $this->getBaseUrl() . $this->getPathInfo() ) === '/' ? '/?' : '?';

		return $query ? ( $this->url() . $question . $query ) : $this->url();
	}
260091
public function query( $query ): string {

		global $wpdb;

		if ( empty( $this->query_starts ) && ! empty( $wpdb->queries ) ) {
			/** @var array $wpdb->queries */
			$this->query_starts[ count( $wpdb->queries ) ] = microtime( true );
		} else {
			$this->query_starts[] = microtime( true );
		}

		return $query;
	}
914231
protected function filterQuery($query)
    {
        $queryInfo = [];

        foreach (explode('&', $query) as $part) {
            list($name, $value) = explode('=', (false === strpos($part, '=') ? "{$part}=" : $part), 2);

            $name = rawurldecode($name);
            $value = rawurldecode($value);

            if (0 === preg_match_all('/\[([^\]]*)\]/m', $name, $matches)) {
                $queryInfo[$name] = $value;
                continue;
            }

            $name   = substr($name, 0, strpos($name, '['));
            $keys   = array_merge([$name], $matches[1]);
            $target = &$queryInfo;

            foreach ($keys as $index) {
                if ('' === $index) {
                    $target = &$target[];
                } else {
                    $target = &$target[$index];
                }
            }

            $target = $value;
        }

        return $queryInfo;
    }
926471
public function getHttpQueryString(array $moreQuery = null): string
    {
        $queries = [];

        if (!(is_null($this->page) || 1 == $this->page)) {
            $queries[$this->getParam()] = $this->page;
        }

        if (!empty($moreQuery)) {
            $queries = array_merge($queries, $moreQuery);
        }

        return !empty($queries) ? '?' . http_build_query($queries) : '';
    }
43464
protected function filterQuery($query)
    {
        $query = preg_replace_callback(
            '/(?:[^' . self::CHARACTERS_UNRESERVED . self::CHARACTERS_SUB_DELIMS . '%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/',
            function ($match) {
                return rawurlencode($match[0]);
            },
            $query
        );

        if (is_null($query)) {
            throw new InvalidArgumentException(sprintf('Invalid query strings "%s".', $query));
        } elseif (!$query) {
            $query = '';
        }

        if (substr($query, 0, 1) === '?') {
            $query = substr($query, 1);
        }

        return $query;
    }
686020
private function post($url, array $query = array())
    {
        return $this->browser->post($url, array(), $this->prepareQueryString($query));
    }
1164199
protected function getQueryString($query)
    {
        $wrapper = ($query instanceof AbstractQuery) ? array('query' => $query->toArray()) : $query->toArray();

        return json_encode($wrapper);
    }
418269
public function queryParams(array $query)
	{
		$this->query = Arrays::mergeDeep($this->query, $query);
		
		return $this;
	}
1250634
protected function appendQuery($url, $query)
    {
        $query = trim($query, '?&');

        if ($query) {
            $glue = strstr($url, '?') === false ? '?' : '&';
            return $url . $glue . $query;
        }

        return $url;
    }
908669
private function filterQuery($query)
    {
        if (! empty($query) && strpos($query, '?') === 0) {
            $query = substr($query, 1);
        }

        $parts = explode('&', $query);
        foreach ($parts as $index => $part) {
            list($key, $value) = $this->splitQueryValue($part);
            if ($value === null) {
                $parts[$index] = $this->filterQueryOrFragment($key);
                continue;
            }
            $parts[$index] = sprintf(
                '%s=%s',
                $this->filterQueryOrFragment($key),
                $this->filterQueryOrFragment($value)
            );
        }

        return implode('&', $parts);
    }
1045537
public function withQueryParams($query): self
    {
        if (!is_string($query)) {
            $query = UriHelper::buildQuery((array) $query);
        }

        return $this->withQuery($query);
    }
1135740
protected function prepareRequestUrl(array $query)
    {
        $path = isset($query['from']['path']) ? $query['from']['path'] : null;

        $wheres = isset($query['wheres']) ? $query['wheres'] : null;

        $baseUrl = $this->host.$path;

        // Here we validate that there are any wheres in the
        // request. When none are provided we will return the
        // Request Url without the question mark.
        if (! is_null($wheres)) {
            return $baseUrl.'?'.$wheres;
        }

        return $baseUrl;
    }
1156402
public function addQueryString($query, $url = null)
    {
        $queryString = '';
        $url = static::prepareUrl($url);
        $query = trim(ampersand($query, false), '&');

        $explodedUrl = explode('?', $url, 2);

        if (2 === \count($explodedUrl)) {
            list($script, $queryString) = $explodedUrl;
        } else {
            list($script) = $explodedUrl;
        }

        parse_str($queryString, $queries);

        $queries = array_filter($queries);
        unset($queries['language']);

        $href = '';

        if (!empty($queries)) {
            parse_str($query, $new);
            $href = '?'.http_build_query(array_merge($queries, $new), '', '&');
        } elseif (!empty($query)) {
            $href = '?'.$query;
        }

        return $script.$href;
    }
315339
private function makeQueryString($query = array())
	{
		$subject = $query[0];
		$operator = $query[1];
		$operand = $query[2];

		switch ($operator)
		{
			case '=':
				$string = $subject . ':' . $operand;
			break;
		}

		return $string;
	}