Properties

$host

$host : string

Host name to look up

Type

string

$latitude

$latitude : string

Latitude value

Type

string

$longitude

$longitude : string

Longitude value

Type

string

$hostInfo

$hostInfo : array

Host info

Type

array

$databases

$databases : string

Array of available databases

Type

string

Methods

__construct()

__construct(array  $options = array()) : \Pop\Geo\Geo

Constructor

Instantiate the Geo object

Parameters

array $options

Returns

\Pop\Geo\Geo

isDbAvailable()

isDbAvailable(string  $name) : boolean

Get an available database

Parameters

string $name

Returns

boolean

getDatabases()

getDatabases() : array

Get all available databases

Returns

array

getHostInfo()

getHostInfo() : array

Get host info

Returns

array

getLatitude()

getLatitude() : string

Get latitude

Returns

string

getLongitude()

getLongitude() : string

Get longitude

Returns

string

distanceTo()

distanceTo(\Pop\Geo\Geo  $dest, integer  $round = 2, boolean  $km = false) : mixed

Get distance from current Geo object coordinates to another

Parameters

\Pop\Geo\Geo $dest
integer $round
boolean $km

Throws

\Pop\Geo\Exception

Returns

mixed

calculateDistance()

calculateDistance(array  $origin, array  $destination, integer  $round = 2, boolean  $km = false) : mixed

Calculate the distance between 2 sets of coordinate

Parameters

array $origin
array $destination
integer $round
boolean $km

Throws

\Pop\Geo\Exception

Returns

mixed

__get()

__get(string  $name) : mixed

Get method to return the value of hostInfo[$name].

Parameters

string $name

Returns

mixed

getAvailableDatabases()

getAvailableDatabases() : void

Get available databases

getGeoIpHostInfo()

getGeoIpHostInfo() : void

Get GeoIp host information