Свойство | Type | Description | |
---|---|---|---|
$coordinate | float | The radian value of the supplied coordinate | |
$parser | ParserInterface | Parser object to use when converting a value to radians and back again |
Méthode | Description | |
---|---|---|
__construct ( string | float $coord = null, Treffynnon\Navigator\Coordinate\ParserInterface $parser = null ) | Setup a new coordinate | |
__toString ( ) : string | Used when a coordinate value is used as a string. This uses the parser to output a human readable format converted from the radian value held in $this->coordinate | |
get ( ) : float | Get a coordinates radian value | |
getParser ( ) : ParserInterface | Get the parser that is currently in use for this coordinate | |
guessParser ( float | string $coord ) : Treffynnon\Navigator\Coordinate\DecimalParser | |
Guess the correct parser for a given coordinate | |
set ( float $coord ) | Sets the coordinate using the parser to a radian value | |
setParser ( Treffynnon\Navigator\Coordinate\ParserInterface $parser ) | Set the parser that should be used to manage this coordinate |
public __construct ( string | float $coord = null, Treffynnon\Navigator\Coordinate\ParserInterface $parser = null ) | ||
$coord | string | float | |
$parser | Treffynnon\Navigator\Coordinate\ParserInterface |
public __toString ( ) : string | ||
Résultat | string |
public getParser ( ) : ParserInterface | ||
Résultat | ParserInterface |
public guessParser ( float | string $coord ) : Treffynnon\Navigator\Coordinate\DecimalParser | |
||
$coord | float | string | |
Résultat | Treffynnon\Navigator\Coordinate\DecimalParser | |
public setParser ( Treffynnon\Navigator\Coordinate\ParserInterface $parser ) | ||
$parser | Treffynnon\Navigator\Coordinate\ParserInterface |
protected float $coordinate | ||
Résultat | float |