Location\Formatter\Coordinate\DecimalDegrees::setSeparator PHP Method

setSeparator() public method

Sets the separator between latitude and longitude values
public setSeparator ( $separator )
$separator
    public function setSeparator($separator)
    {
        $this->separator = $separator;
        return $this;
    }

Usage Example

Beispiel #1
0
 /**
  * @covers Location\Formatter\Coordinate\DecimalDegrees::format
  */
 public function testIfSetSeparatorWorksAsExpected()
 {
     $coordinate = new Coordinate(52.5, 13.5);
     $formatter = new DecimalDegrees();
     $formatter->setSeparator("/");
     $this->assertEquals("52.50000/13.50000", $formatter->format($coordinate));
 }