1 | <?php |
||
17 | final class OpenCageAddress extends Address |
||
18 | { |
||
19 | /** |
||
20 | * @var string|null |
||
21 | * |
||
22 | * @see https://en.wikipedia.org/wiki/Military_Grid_Reference_System |
||
23 | */ |
||
24 | private $mgrs; |
||
25 | |||
26 | /** |
||
27 | * @var string|null |
||
28 | * |
||
29 | * @see https://en.wikipedia.org/wiki/Maidenhead_Locator_System |
||
30 | */ |
||
31 | private $maidenhead; |
||
32 | |||
33 | /** |
||
34 | * @var string|null |
||
35 | * |
||
36 | * @see https://en.wikipedia.org/wiki/Geohash |
||
37 | */ |
||
38 | private $geohash; |
||
39 | |||
40 | /** |
||
41 | * @var string|null |
||
42 | * |
||
43 | * @see https://what3words.com/ |
||
44 | */ |
||
45 | private $what3words; |
||
46 | |||
47 | /** |
||
48 | * @var string|null |
||
49 | */ |
||
50 | private $formattedAddress; |
||
51 | |||
52 | /** |
||
53 | * @param null|string $mgrs |
||
54 | * |
||
55 | * @return OpenCageAddress |
||
56 | */ |
||
57 | 8 | public function withMGRS(string $mgrs = null): self |
|
64 | |||
65 | /** |
||
66 | * @return null|string |
||
67 | */ |
||
68 | 2 | public function getMGRS() |
|
72 | |||
73 | /** |
||
74 | * @param null|string $maidenhead |
||
75 | * |
||
76 | * @return OpenCageAddress |
||
77 | */ |
||
78 | 8 | public function withMaidenhead(string $maidenhead = null): self |
|
85 | |||
86 | /** |
||
87 | * @return null|string |
||
88 | */ |
||
89 | 2 | public function getMaidenhead() |
|
93 | |||
94 | /** |
||
95 | * @param null|string $geohash |
||
96 | * |
||
97 | * @return OpenCageAddress |
||
98 | */ |
||
99 | 8 | public function withGeohash(string $geohash = null): self |
|
106 | |||
107 | /** |
||
108 | * @return null|string |
||
109 | */ |
||
110 | 2 | public function getGeohash() |
|
114 | |||
115 | /** |
||
116 | * @param null|string $what3words |
||
117 | * |
||
118 | * @return OpenCageAddress |
||
119 | */ |
||
120 | 8 | public function withWhat3words(string $what3words = null): self |
|
127 | |||
128 | /** |
||
129 | * @return null|string |
||
130 | */ |
||
131 | 2 | public function getWhat3words() |
|
135 | |||
136 | /** |
||
137 | * @param string|null $formattedAddress |
||
138 | * |
||
139 | * @return OpenCageAddress |
||
140 | */ |
||
141 | 8 | public function withFormattedAddress(string $formattedAddress = null): self |
|
148 | |||
149 | /** |
||
150 | * @return null|string |
||
151 | */ |
||
152 | 2 | public function getFormattedAddress() |
|
156 | } |
||
157 |