getParser() public method

Get the parser that is currently in use for this coordinate
public getParser ( ) : ParserInterface
return ParserInterface
示例#1
0
 /**
  * @dataProvider coordValidProvider
  */
 public function testConstructorSetParser($coord)
 {
     $parser = new C\DecimalParser();
     $Coordinate = new N\Coordinate($coord, $parser);
     $this->assertInstanceOf('Treffynnon\\Navigator\\Coordinate\\DecimalParser', $Coordinate->getParser());
 }
示例#2
0
 /**
  * Prime the coordinate parser with any additional information
  * necessary 
  */
 protected function primeCoordinateParsers()
 {
     $this->latitude->getParser()->setDirection(N::Lat);
     $this->longitude->getParser()->setDirection(N::Long);
 }