class Controller extends GeolocatorController (View source)

Constants

GEOPLUGIN_STATUS_OK

OK, lookup no problem.

GEOPLUGIN_STATUS_ONLYCOUNTRY

Lookup OK, but only country data returned, no city values found (a play on the http 206 partial content code).

GEOPLUGIN_STATUS_NOTFOUND

No data found for the IP at all.

Properties

protected Geolocator $geolocator from  GeolocatorController
private Record|null $configurationRecord from  GeolocatorController

Methods

__construct(Geolocator $geolocator)

No description

getFileRecord(string $file)

Get the path to a geolocator file.

bool
hasConfigurationForm()

Does this geolocator library has a configuration form?

renderConfigurationForm()

Render the configuration form.

array
saveConfigurationForm(array $configuration, ParameterBag $data, ErrorList $error)

Save the configuration form.

geolocateIPAddress(AddressInterface $address)

Geolocate an IP address.

performGeolocation(AddressInterface $address)

Geolocate an IP address.

dataToGeolocationResult(array $data, array $configuration, GeolocationResult $result)

No description

Details

__construct(Geolocator $geolocator)

No description

Parameters

Geolocator $geolocator

protected Record getFileRecord(string $file)

Get the path to a geolocator file.

Parameters

string $file

Return Value

Record

protected Record getConfigurationRecord()

No description

Return Value

Record

bool hasConfigurationForm()

Does this geolocator library has a configuration form?

renderConfigurationForm()

Render the configuration form.

array saveConfigurationForm(array $configuration, ParameterBag $data, ErrorList $error)

Save the configuration form.

Parameters

array $configuration

The initial geolocator configuration

ParameterBag $data

The data received

ErrorList $error

Add errors to this instance

Return Value

array

The final geolocator configuration

See also

GeolocatorControllerInterface::saveConfigurationForm

GeolocationResult geolocateIPAddress(AddressInterface $address)

Geolocate an IP address.

Parameters

AddressInterface $address

Return Value

GeolocationResult

See also

GeolocatorControllerInterface::geolocateIPAddress

protected GeolocationResult performGeolocation(AddressInterface $address)

Geolocate an IP address.

Parameters

AddressInterface $address

Return Value

GeolocationResult

See also

GeolocatorController::performGeolocation

private dataToGeolocationResult(array $data, array $configuration, GeolocationResult $result)

No description

Parameters

array $data
array $configuration
GeolocationResult $result