GeoLocationService
Table of Contents
Constants
-
CACHE_TTL
= 3600
Methods
-
getLocationData()
: array<string|int, mixed>
-
hasCountryChanged()
: bool
-
fetchLocationData()
: array<string|int, mixed>
-
isPrivateIp()
: bool
CACHE_TTL
private
mixed
CACHE_TTL
= 3600
getLocationData()
public
getLocationData(string $ipAddress) : array<string|int, mixed>
Parameters
-
$ipAddress
: string
-
Return values
array<string|int, mixed>
hasCountryChanged()
public
hasCountryChanged(string $oldCountryCode, string $newCountryCode) : bool
Parameters
-
$oldCountryCode
: string
-
-
$newCountryCode
: string
-
fetchLocationData()
private
fetchLocationData(string $ipAddress) : array<string|int, mixed>
Parameters
-
$ipAddress
: string
-
Return values
array<string|int, mixed>
isPrivateIp()
private
isPrivateIp(string $ip) : bool
Parameters
-
$ip
: string
-