abstract class GeolocatorController extends Controller implements GeolocatorControllerInterface (View source)

Properties

protected Geolocator $geolocator
private Record|null $configurationRecord

Methods

__construct(Geolocator $geolocator)

No description

getFileRecord(string $file)

Get the path to a geolocator file.

getConfigurationRecord()

No description

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.

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

abstract protected GeolocationResult performGeolocation(AddressInterface $address)

Geolocate an IP address.

Parameters

AddressInterface $address

Return Value

GeolocationResult