PHP Interface Treffynnon\Navigator\Coordinate\ParserInterface

Afficher le fichier Open project: treffynnon/navigator

Méthodes publiques

Méthode 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 méthode

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

get() public méthode

public get ( $coord )

getDirection() public méthode

Get the direction string
public getDirection ( ) : string
Résultat string

parse() public méthode

public parse ( $coord )

set() public méthode

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

setDirection() public méthode

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