PHP Interface Treffynnon\Navigator\Coordinate\ParserInterface

Datei anzeigen Open project: treffynnon/navigator

Public Methods

Method Description
__construct ( string $direction = null ) Initialise parser. Pass in either Treffynnon\Navigator::Long or Treffynnon\Navigator::Lat
get ( $coord )
getDirection ( ) : string Get the direction string
parse ( $coord )
set ( float | string $coord ) : float Wrapper function around the parse method to allow for coordinate validation
setDirection ( string $direction ) Set the direction using Treffynnon\Navigator::Long or Treffynnon\Navigator::Lat

Method Details

__construct() public method

Initialise parser. Pass in either Treffynnon\Navigator::Long or Treffynnon\Navigator::Lat
public __construct ( string $direction = null )
$direction string

get() public method

public get ( $coord )

getDirection() public method

Get the direction string
public getDirection ( ) : string
return string

parse() public method

public parse ( $coord )

set() public method

Wrapper function around the parse method to allow for coordinate validation
public set ( float | string $coord ) : float
$coord float | string
return float

setDirection() public method

Set the direction using Treffynnon\Navigator::Long or Treffynnon\Navigator::Lat
public setDirection ( string $direction )
$direction string