Treffynnon\Navigator\Coordinate::__construct PHP Method

__construct() public method

Setup a new coordinate
public __construct ( string | float $coord = null, Treffynnon\Navigator\Coordinate\ParserInterface $parser = null )
$coord string | float
$parser Treffynnon\Navigator\Coordinate\ParserInterface
    public function __construct($coord = null, C\ParserInterface $parser = null)
    {
        if (is_null($parser)) {
            $parser = $this->guessParser($coord);
        }
        $this->setParser($parser);
        if (!is_null($coord)) {
            $this->set($coord);
        }
    }