src/Nominatim.php
public function find(QueryInterface $nRequest, array $headers = [])
    {
        $url = $this->application_url . '/' . $nRequest->getPath() . '?';
        $request = new Request('GET', $url, \array_merge($this->defaultHeaders, $headers));

        //Convert the query array to string with space replace to +
        $query = \GuzzleHttp\Psr7\build_query($nRequest->getQuery(), PHP_QUERY_RFC1738);

        $url = $request->getUri()->withQuery($query);
        $request = $request->withUri($url);

        return $this->decodeResponse(
            $nRequest->getFormat(),
            $request,
            $this->http_client->send($request)
        );
    }
public function find(QueryInterface $nRequest, array $headers = [])
    {
        $url = $this->application_url . '/' . $nRequest->getPath() . '?';
        $request = new Request('GET', $url, \array_merge($this->defaultHeaders, $headers));

        //Convert the query array to string with space replace to +
        $query = \GuzzleHttp\Psr7\build_query($nRequest->getQuery(), PHP_QUERY_RFC1738);

        $url = $request->getUri()->withQuery($query);
        $request = $request->withUri($url);

        return $this->decodeResponse(
            $nRequest->getFormat(),
            $request,
            $this->http_client->send($request)
        );
    }
public function find ( QueryInterface $ nRequest , array $ headers = [ ] ) { $ url = $ this -> application_url . '/' . $ nRequest -> getPath ( ) . '?' ; $ request = new Request ( 'GET' , $ url , \ array_merge ( $ this -> defaultHeaders , $ headers ) ) ; //Convert the query array to string with space replace to + $ query = \ GuzzleHttp \ Psr7 \ build_query ( $ nRequest -> getQuery ( ) , PHP_QUERY_RFC1738 ) ; $ url = $ request -> getUri ( ) -> withQuery ( $ query ) ; $ request = $ request -> withUri ( $ url ) ; return $ this -> decodeResponse ( $ nRequest -> getFormat ( ) , $ request , $ this -> http_client -> send ( $ request ) ) ; }
Runs the query and returns the result set from Nominatim.

@param QueryInterface $nRequest The object request to send
@param array          $headers  Override the request header

@throws NominatimException                    if no format for decode
@throws \GuzzleHttp\Exception\GuzzleException

@return array|\SimpleXMLElement The decoded data returned from Nominatim
Runs the query and returns the result set from Nominatim .