| 1 | <?php |
||
| 14 | class DecimalDegrees implements FormatterInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var string Separator string between latitude and longitude |
||
| 18 | */ |
||
| 19 | protected $separator; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var int |
||
| 23 | */ |
||
| 24 | protected $digits = 5; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $separator |
||
| 28 | * @param int $digits |
||
| 29 | */ |
||
| 30 | public function __construct(string $separator = ' ', int $digits = 5) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param Coordinate $coordinate |
||
| 38 | * |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | public function format(Coordinate $coordinate): string |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Sets the separator between latitude and longitude values |
||
| 53 | * |
||
| 54 | * @param string $separator |
||
| 55 | * |
||
| 56 | * @return $this |
||
| 57 | */ |
||
| 58 | public function setSeparator(string $separator): DecimalDegrees |
||
| 64 | } |
||
| 65 |