GET results

@param array $params
@return array
511136
public function get(array $params) {
        $this->_requireDataType($params);

        if (array_get($params, 'datatype') === self::METHOD_DICTIONARY) {
            return $this->getDictionary();
        } elseif (array_get($params, 'relatedType') && array_get($params, 'id')) {
            list($response, $httpCode) = $this->_getRelatedResults($params);
        } elseif (array_get($params, 'id')) {
            list($response, $httpCode) = $this->_getSingleResult($params);
        } else {
            list($response, $httpCode) = $this->_getIndex($params);
        }

        return $this->_formatResponse($response, $httpCode);
    }
748927
protected function getHeaders($params)
    {
        $headers = array();
        
        foreach ($params as $name => $value) {
            if (substr($name, 0, 5) === 'HTTP_') {
                $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))));
                $headers[$key] = $value;
            }
        }
        
        return $headers;
    }
102359
public function getChanges(array $params = [])
    {
        $path = '/'.$this->databaseName.'/_changes';

        $method = ((!isset($params['doc_ids']) || $params['doc_ids'] == null) ? 'GET' : 'POST');
        $response = '';

        if ($method == 'GET') {
            foreach ($params as $key => $value) {
                if (isset($params[$key]) === true && is_bool($value) === true) {
                    $params[$key] = ($value) ? 'true' : 'false';
                }
            }
            if (count($params) > 0) {
                $query = http_build_query($params);
                $path = $path.'?'.$query;
            }
            $response = $this->httpClient->request('GET', $path);
        } else {
            $path .= '?filter=_doc_ids';
            $response = $this->httpClient->request('POST', $path, json_encode($params));
        }
        if ($response->status != 200) {
            throw HTTPException::fromResponse($path, $response);
        }

        return $response->body;
    }
66252
public function getList($params = array())
    {
        $resource = 'georegion.json';
        $resource .= '?' . $this->buildQueryString($params);
        $response = $this->getServiceResponse($resource);

        $geoRegions = new Models\ResponseGeoRegionsGet($response);

        return $geoRegions;
    }
210425
public function getAll(array $params = [])
    {
        return $this->executeRequest(
            RequestMethodEnum::GET,
            ResourceMethodEnum::GET_ALL,
            $params,
            null
        );
    }
1170074
public function getRealParams(array $params)
    {
        foreach ($params as $k => $p) {
            if (is_array($p)) {
                $params[$k] = $p[1];
            }
        }

        return $params;
    }
1293222
public function execute(array $params = []) : array
    {
        foreach ($params as $paramName => $paramValue) {
            $type = is_int($paramValue) ? \PDO::PARAM_INT : \PDO::PARAM_STR;
            $this->getStatement()->bindValue($paramName, $paramValue, $type);
        }
        $this->getStatement()->execute();

        return $this->getStatement()->fetchAll(\PDO::FETCH_ASSOC);
    }
440650
private function getParams(array $params)
    {
        $result = [];
        foreach ($params as $name => $item) {
            $value = $item['value'];
            if ('collection' === $item['type']) {
                $value = $this->getParams($value);
            }

            $result[$name] = new PropertyParameter($name, $value, $item['type']);
        }

        return $result;
    }
533020
protected function query(array $params)
    {
        $params['appid'] = $this->app['config']->app_id;

        return $this->request($this->wrap('pay/orderquery'), $params);
    }
894513
public function getMatch($params = array())
    {
        $resource = 'model/match.json';
        $resource .= '?' . $this->buildQueryString($params);
        $response = $this->getServiceResponse($resource);

        $getModelMatchResponse = new Models\ResponseModelMatchGet($response);

        return $getModelMatchResponse;
    }
774227
public function all(array $params = array())
    {
        $endpoint = '/admin/pages.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(Page::class, $response['pages']);
    }
305396
protected function prepareParams(array $params)
	{
		$prepared = [];
		
		foreach($params as $k => $v)
		{
			if(is_array($v))
			{
				foreach(array_values($v) as $i => $val)
				{
					$prepared[sprintf('%s%u', $k, $i)] = $val;
				}
			}
			else
			{
				$prepared[(string)$k] = $v;
			}
		}
		
		return $prepared;
	}
536918
protected function _getRelatedResults(array $params) {
        // Check for existence of the subject record first, in order to return a 404 error
        list($subjectRecord, $httpCode) = $this->_getSingleResult($params);
        if (!$subjectRecord['success']) {
            return array(
                array(
                    'success' => false,
                    'result' => array()
                ),
                404
            );
        }

        $schema = new Garp_Content_Api_Rest_Schema('rest');
        $relation = $schema->getRelation($params['datatype'], $params['relatedType']);
        list($rule1, $rule2) = $relation->getRules($params['datatype']);

        $contentManager = $this->_getContentManager($relation->model);
        $subjectId = $params['id'];
        unset($params['id']);
        $options = $this->_extractOptionsForFetch($params);
        $options['query'][ucfirst($params['datatype']) . '.id'] = $subjectId;
        $options['bindingModel'] = $relation->getBindingModel()->id;
        $options['rule'] = $rule1;
        $options['rule2'] = $rule2;
        $options['fields'] = Zend_Db_Select::SQL_WILDCARD;

        if ($contentManager->getModel()->isMultilingual()) {
            $options['joinMultilingualModel'] = true;
        }
        $records = $contentManager->fetch($options);
        $amount = count($records);
        $records = array($params['relatedType'] => $records);
        if (isset($options['with'])) {
            $records = $this->_combineRecords($params['relatedType'], $records, $options['with']);
        }
        return array(
            array(
                'success' => true,
                'result' => $records,
                'amount' => $amount,
                'total' => intval($contentManager->count($options))
            ),
            200
        );
    }
615256
public function all(array $params = array())
    {
        $endpoint = '/admin/reports.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(Report::class, $response['reports']);
    }
501080
public function all(array $params = array())
    {
        $endpoint = '/admin/redirects.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(Redirect::class, $response['redirects']);
    }
1123970
public function getAll(array $queryParams = [])
    {
        $response = $this->client->get($this->uri(), [
            'query' => $queryParams,
        ]);

        return $this->handleResponse($response);
    }
523149
public function getByIds(array $ids, array $params = [])
    {
        return $this->executeRequest(
            RequestMethodEnum::GET,
            ResourceMethodEnum::GET_BY_IDS,
            $params,
            $ids
        );
    }