Geocoder\Provider\GoogleMaps::buildQuery PHP Method

buildQuery() private method

private buildQuery ( string $query ) : string
$query string
return string query with extra params
    private function buildQuery($query)
    {
        if (null !== $this->getLocale()) {
            $query = sprintf('%s&language=%s', $query, $this->getLocale());
        }
        if (null !== $this->region) {
            $query = sprintf('%s&region=%s', $query, $this->region);
        }
        if (null !== $this->apiKey) {
            $query = sprintf('%s&key=%s', $query, $this->apiKey);
        }
        if (null !== $this->clientId) {
            $query = sprintf('%s&client=%s', $query, $this->clientId);
            if (null !== $this->privateKey) {
                $query = $this->signQuery($query);
            }
        }
        return $query;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 protected function buildQuery($query)
 {
     $query = parent::buildQuery($query);
     $query = sprintf('%s&client=%s', $query, $this->clientId);
     if (null !== $this->privateKey) {
         $query = $this->signQuery($query);
     }
     return $query;
 }
All Usage Examples Of Geocoder\Provider\GoogleMaps::buildQuery