/** * Parses the incoming request query string and sets appropriate properties on this RestRequest object. * * @param string $queryString * @return self * @throws RestException */ private function parseQueryString($queryString) { parse_str($queryString, $parsed); $supported = $this->getSupportedParams(); foreach ($parsed as $param => $value) { if (!isset($supported[$param])) { throw RestException::unsupportedQueryParam($param, array_keys($supported)); } } $this->extractInclusions($parsed); $this->extractSorting($parsed); $this->extractFields($parsed); $this->extractPagination($parsed); $this->extractFilters($parsed); return $this; }