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
$lat
public
float|null
$lat
$lng
public
float|null
$lng
$name
public
string
$name
$radius
public
float
$radius
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|nullgetLocationForIP()
public
static getLocationForIP([string $ipAddress = null ]) : Location|null
Parameters
- $ipAddress : string = null
Return values
Location|nullgetLocationForLatLng()
public
static getLocationForLatLng(float $lat, float $lng) : Location|null
Parameters
- $lat : float
- $lng : float
Return values
Location|nullgetLocations()
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
boolvalidateSetting()
public
static validateSetting(string $settings) : mixed
Parameters
- $settings : string