PHP Class Treffynnon\Navigator

Exibir arquivo Open project: treffynnon/navigator Class Usage Examples

Public Methods

Method Description
autoloader ( ) Setup the autoloader to load the Treffynnon\Navigator library
distanceFactory ( string | float $lat1, string | float $long1, string | float $lat2, string | float $long2 ) : Distance Get a primed instance of the distance object
getDistance ( string | float $lat1, string | float $long1, string | float $lat2, string | float $long2 ) : float Get the distance in metres

Private Methods

Method Description
splAutoloader ( string $class_name ) Convert class names into file paths for inclusion

Method Details

autoloader() public static method

Setup the autoloader to load the Treffynnon\Navigator library
public static autoloader ( )

distanceFactory() public static method

Get a primed instance of the distance object
public static distanceFactory ( string | float $lat1, string | float $long1, string | float $lat2, string | float $long2 ) : Distance
$lat1 string | float
$long1 string | float
$lat2 string | float
$long2 string | float
return Treffynnon\Navigator\Distance

getDistance() public static method

Get the distance in metres
public static getDistance ( string | float $lat1, string | float $long1, string | float $lat2, string | float $long2 ) : float
$lat1 string | float
$long1 string | float
$lat2 string | float
$long2 string | float
return float