Build query params
@return array
324306
private function _buildQueryParams() {
		$query = [];

		$this->_where = is_array($this->_where) ? $this->_where : [];
		foreach ($this->_where as $key => $val) {
			$query[$key] = is_numeric($val) ? (int) $val : $val;
		}

		if(count($this->_select)) {
			$query[$this->selectFieldsKey] = implode(',', $this->_select);
		}
		if($this->_limit !== null) {
			$query[$this->limitKey] = $this->_limit;
		}
		if($this->_offset !== null) {
			$query[$this->offsetKey] = $this->_offset;
		}

		return $query;
	}
1254897
private function buildSearchParameters() {
        $fields = $this->getModelBuilder()->getFields();
        $numberOfFields = sizeof($fields);
        if($numberOfFields > 5) {
            $numberOfFields = 5;
        }
        $parameters = array();
        for($i = 0; $i < $numberOfFields; $i++) {
            $parameter = new Swagger\Parameter();
            $parameter->setName($fields[$i]->getShortName());
            $parameter->setDescription($fields[$i]->getComment());
            $parameter->setParamType('query');
            $parameter->setType($fields[$i]->getSwaggerType());
            $parameters[] = $parameter;
        }

        return $parameters;
    }
696125
public function whereParameters()
    {
        return array_filter(
            $this->queryParameters,
            function ($queryParameter) {
                $key = $queryParameter['key'];
                return (! in_array($key, $this->predefinedParams));
            }
        );
    }
787098
public function buildSearchParameters()
    {
        $search_parameters = array();

        if ($this->isSearch) {
            // format for a search
            $approved_search = array();
            foreach ($this->getSearchFields() as $field => $value) {
                // if we spot a wild card, convert to LIKE
                if (strstr($value, '*')) {
                    $value = str_replace('*', '%', $value);
                    $approved_search[] = "$field LIKE '$value'";
                } else {
                    if (strstr($value, '!')) {
                        $value = str_replace('!', '%', $value);
                        $approved_search[] = "$field NOT LIKE '$value'";
                    } else {
                        $approved_search[] = "$field='$value'";
                    }
                }
            }
            // implode as specified by phalcon
            $search_parameters = array(
                implode(' and ', $approved_search)
            );
        }

        $limit = $this->getLimit();
        if ($limit) {
            $search_parameters['limit'] = $limit;
        }

        $offset = $this->getOffset();
        if ($offset) {
            $search_parameters['offset'] = $offset;
        }

        $sort = $this->getSort('sql');
        if ($sort) {
            // first_name,-last_name
            $search_parameters['order'] = $sort;
        }

        return $search_parameters;
    }
385474
public function getQueryParams() : array
    {
        $this->queryStrings->usePercentEncode(false);
        $r = $this->queryStrings->toArray(true);
        $this->queryStrings->usePercentEncode(true);

        return $r;
    }
313107
public function get_collection_params() {
		$query_params = parent::get_collection_params();
		$taxonomy = get_taxonomy( $this->taxonomy );

		$query_params['context']['default'] = 'view';

		$query_params['exclude'] = array(
			'description'       => __( 'Ensure result set excludes specific ids.' ),
			'type'              => 'array',
			'default'           => array(),
			'sanitize_callback' => 'wp_parse_id_list',
		);
		$query_params['include'] = array(
			'description'       => __( 'Limit result set to specific ids.' ),
			'type'              => 'array',
			'default'           => array(),
			'sanitize_callback' => 'wp_parse_id_list',
		);
		if ( ! $taxonomy->hierarchical ) {
			$query_params['offset'] = array(
				'description'       => __( 'Offset the result set by a specific number of items.' ),
				'type'              => 'integer',
				'sanitize_callback' => 'absint',
				'validate_callback' => 'rest_validate_request_arg',
			);
		}
		$query_params['order'] = array(
			'description'       => __( 'Order sort attribute ascending or descending.' ),
			'type'              => 'string',
			'sanitize_callback' => 'sanitize_key',
			'default'           => 'asc',
			'enum'              => array(
				'asc',
				'desc',
			),
			'validate_callback' => 'rest_validate_request_arg',
		);
		$query_params['orderby'] = array(
			'description'       => __( 'Sort collection by resource attribute.' ),
			'type'              => 'string',
			'sanitize_callback' => 'sanitize_key',
			'default'           => 'name',
			'enum'              => array(
				'id',
				'include',
				'name',
				'slug',
				'term_group',
				'description',
				'count',
			),
			'validate_callback' => 'rest_validate_request_arg',
		);
		$query_params['hide_empty'] = array(
			'description'       => __( 'Whether to hide resources not assigned to any posts.' ),
			'type'              => 'boolean',
			'default'           => false,
			'validate_callback' => 'rest_validate_request_arg',
		);
		if ( $taxonomy->hierarchical ) {
			$query_params['parent'] = array(
				'description'       => __( 'Limit result set to resources assigned to a specific parent.' ),
				'type'              => 'integer',
				'sanitize_callback' => 'absint',
				'validate_callback' => 'rest_validate_request_arg',
			);
		}
		$query_params['post'] = array(
			'description'       => __( 'Limit result set to resources assigned to a specific post.' ),
			'type'              => 'integer',
			'default'           => null,
			'validate_callback' => 'rest_validate_request_arg',
		);
		$query_params['slug'] = array(
			'description'       => __( 'Limit result set to resources with a specific slug.' ),
			'type'              => 'string',
			'validate_callback' => 'rest_validate_request_arg',
		);
		return $query_params;
	}
327750
public function query()
    {
        $params = func_get_args();
        $query = array_shift($params);

        // Support one argument of type array, instead of n arguments
        if (count($params) == 1 && is_array($params[0])) {
            $params = $params[0];
        }

        return $this->_query($query, 0, 0, $params);
    }
917769
public function getQueryParameters()
    {
        //TODO: the contract is more specific than this, it requires the name and values to be decoded
        //not sure how to test that...
        //TODO: another issue.  This may not be the right thing to return...since POData only really understands GET requests today

        //Have to convert to the stranger format known to POData that deals with multiple query strings.
        //this makes this request a bit non compliant as it doesn't expose duplicate keys, something POData will check for
        //instead whatever parameter was last in the query string is set.  IE
        //odata.svc/?$format=xml&$format=json the format will be json
        $data = array();
        foreach($this->request->get() as $key => $value)
        {
            $data[] = array($key => $value );
        }

        return $data;
    }
441975
protected function buildParams(array $params)
	{
		return array_merge(array(
			$this->database,
			$this->uid(),
			$this->password
		), $params);
	}
772393
public function build($params)
    {
        return ((isset($params['scheme'])) ? $params['scheme'] . '://' : '')
            . ((isset($params['user'])) ? $params['user'] . ((isset($params['pass'])) ? ':' . $params['pass'] : '') . '@' : '')
            . ((isset($params['host'])) ? $params['host'] : '')
            . ((isset($params['port'])) ? ':' . $params['port'] : '')
            . ((isset($params['path'])) ? $params['path'] : '')
            . ((isset($params['query'])) ? '?' . $params['query'] : '')
            . ((isset($params['fragment'])) ? '#' . $params['fragment'] : '');
    }
139020
protected function getHttpQuery()
    {
        $arguments = [];

        foreach ($this->params as $key => $value) {
            if (isset(self::$encodeParams[$key])) {
                $arguments[$key] = json_encode($value);
            } elseif (is_bool($value)) {
                $arguments[$key] = $value ? 'true' : 'false';
            } else {
                $arguments[$key] = $value;
            }
        }

        return sprintf(
            '/%s/_design/%s/_view/%s?%s',
            $this->databaseName,
            $this->designDocumentName,
            $this->viewName,
            http_build_query($arguments)
        );
    }
625898
public function getQueryParameters() {
        $params = array();
        $params['userId'] = $this->user_id;
        $params['itemId'] = $this->item_id;
        if (isset($this->optional['sessionId']))
            $params['sessionId'] = $this->optional['sessionId'];
        return $params;
    }
385341
function makeQuery()
    {
        $query = array();
        foreach($this->query as $paramater) {
            $operator = ($paramater[1] != '=') ? $paramater[1] : '' ;
            $query[$paramater[0] . $operator] = $paramater[2];
        }
        return $query;
    }
979913
protected function getQueryParams(array $params = []): string
    {
        if (empty($params)) {
            return '';
        }
        $query = $params['query'] ?? [];
        if (is_string($query)) {
            return $query;
        }
        return empty($query) ? '' : http_build_query($query);
    }
626804
public function getParams(): array
    {
        $params = [
            'openid.assoc_handle' => $this->request->get(self::OPENID_ASSOC_HANDLE),
            'openid.signed' => $this->request->get(self::OPENID_SIGNED),
            'openid.sig' => $this->request->get(self::OPENID_SIG),
            'openid.ns' => self::OPENID_NS,
            'openid.mode' => 'check_authentication',
        ];

        $signedParams = explode(',', $this->request->get(self::OPENID_SIGNED));

        foreach ($signedParams as $item) {
            $value = $this->request->get('openid_'.str_replace('.', '_', $item));
            $params['openid.'.$item] = get_magic_quotes_gpc() ? stripslashes($value) : $value;
        }

        return $params;
    }
220522
public function buildQuery(array $params = [])
    {
        $params = array_merge($params, [
          'user_login' => $this->login,
          'api_key' => $this->apiKey
        ]);
        return http_build_query($params);
    }
459678
public function getQueryParams()
    {
        if (is_array($this->query)) {
            return $this->query;
        }

        if ($this->uri === null) {
            return [];
        }

        parse_str($this->uri->getQuery(), $this->query);

        return $this->query;
    }