1 | <?php |
||
21 | class Geo extends Property |
||
22 | { |
||
23 | /** |
||
24 | * @var float |
||
25 | */ |
||
26 | private $latitude; |
||
27 | |||
28 | /** |
||
29 | * @var float |
||
30 | */ |
||
31 | private $longitude; |
||
32 | |||
33 | 8 | public function __construct(float $latitude, float $longitude) |
|
48 | |||
49 | /** |
||
50 | * @deprecated This method is used to allow backwards compatibility for Event::setLocation |
||
51 | * |
||
52 | * @return Geo |
||
53 | */ |
||
54 | 2 | public static function fromString(string $geoLocationString): self |
|
62 | |||
63 | /** |
||
64 | * Returns the coordinates as a string. |
||
65 | * |
||
66 | * @example 37.386013;-122.082932 |
||
67 | */ |
||
68 | 6 | public function getGeoLocationAsString(string $separator = ';'): string |
|
72 | |||
73 | 2 | public function getLatitude(): float |
|
77 | |||
78 | 2 | public function getLongitude(): float |
|
82 | } |
||
83 |