PHP Class Geocoder\Provider\MaxMind

Author: Andrea Cristaudo ([email protected])
Inheritance: extends AbstractHttpProvider, implements Geocoder\Provider\Provider
Afficher le fichier Open project: willdurand/geocoder Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Http\Client\HttpClient $client, string $apiKey, string $service = self::CITY_EXTENDED_SERVICE, boolean $useSsl = false )
geocode ( $address ) {@inheritDoc}
getName ( ) {@inheritDoc}
reverse ( $latitude, $longitude ) {@inheritDoc}

Private Methods

Méthode Description
countryCodeToCountryName ( $code )
executeQuery ( string $query )
fieldsForService ( string $service ) : string[] We do not support Country and City services because they do not return much fields.
getCountryNames ( ) : array
replaceAdmins ( $data )

Method Details

__construct() public méthode

public __construct ( Http\Client\HttpClient $client, string $apiKey, string $service = self::CITY_EXTENDED_SERVICE, boolean $useSsl = false )
$client Http\Client\HttpClient An HTTP adapter.
$apiKey string An API key.
$service string The specific Maxmind service to use (optional).
$useSsl boolean Whether to use an SSL connection (optional).

geocode() public méthode

{@inheritDoc}
public geocode ( $address )

getName() public méthode

{@inheritDoc}
public getName ( )

reverse() public méthode

{@inheritDoc}
public reverse ( $latitude, $longitude )