Documentation

Location
in package
implements geo

A Location is generally a physical place, with an internet connection. These likely correspond to campuses, but don't necessarily need to.

Table of Contents

Interfaces

geo
For classes that have geographic attributes, or potential geographic attributes

Properties

$ipAddresses  : array<string|int, mixed>
$lat  : float|null
$lng  : float|null
$name  : string
$radius  : float

Methods

asGeoIFace()  : object|null
Returns a standardized stdObject, or null if not viable.
getLocationForIP()  : Location|null
getLocationForLatLng()  : Location|null
getLocations()  : array<string|int, Location>
Get an array of the
hasGeo()  : bool
Indicates whether this particular location has lat/lng location.
validateSetting()  : mixed

Properties

$ipAddresses

public array<string|int, mixed> $ipAddresses

Methods

asGeoIFace()

Returns a standardized stdObject, or null if not viable.

public asGeoIFace([string $type = "unknown" ]) : object|null

Return object properties are lat, lng, human, and type.

Parameters
$type : string = "unknown"

'loc' for navigator location, or 'ip' for ip address location

Return values
object|null

getLocationForIP()

public static getLocationForIP([string $ipAddress = null ]) : Location|null
Parameters
$ipAddress : string = null
Return values
Location|null

getLocationForLatLng()

public static getLocationForLatLng(float $lat, float $lng) : Location|null
Parameters
$lat : float
$lng : float
Return values
Location|null

getLocations()

Get an array of the

public static getLocations() : array<string|int, Location>
Return values
array<string|int, Location>

hasGeo()

Indicates whether this particular location has lat/lng location.

public hasGeo() : bool
Return values
bool

validateSetting()

public static validateSetting(string $settings) : mixed
Parameters
$settings : string

        
On this page

Search results