1 | <?php |
||
21 | final class CountryInfo |
||
22 | { |
||
23 | /** |
||
24 | * @var Bounds|null |
||
25 | */ |
||
26 | private $bounds; |
||
27 | |||
28 | /** |
||
29 | * @var string|null |
||
30 | */ |
||
31 | private $continent; |
||
32 | |||
33 | /** |
||
34 | * @var string|null |
||
35 | */ |
||
36 | private $capital; |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | private $languages = []; |
||
42 | |||
43 | /** |
||
44 | * @var int|null |
||
45 | */ |
||
46 | private $geonameId; |
||
47 | |||
48 | /** |
||
49 | * @var string|null |
||
50 | */ |
||
51 | private $isoAlpha3; |
||
52 | |||
53 | /** |
||
54 | * @var string|null |
||
55 | */ |
||
56 | private $fipsCode; |
||
57 | |||
58 | /** |
||
59 | * @var int|null |
||
60 | */ |
||
61 | private $population; |
||
62 | |||
63 | /** |
||
64 | * @var int|null |
||
65 | */ |
||
66 | private $isoNumeric; |
||
67 | |||
68 | /** |
||
69 | * @var float|null |
||
70 | */ |
||
71 | private $areaInSqKm; |
||
72 | |||
73 | /** |
||
74 | * @var string|null |
||
75 | */ |
||
76 | private $countryCode; |
||
77 | |||
78 | /** |
||
79 | * @var string|null |
||
80 | */ |
||
81 | private $countryName; |
||
82 | |||
83 | /** |
||
84 | * @var string|null |
||
85 | */ |
||
86 | private $continentName; |
||
87 | |||
88 | /** |
||
89 | * @var string|null |
||
90 | */ |
||
91 | private $currencyCode; |
||
92 | |||
93 | /** |
||
94 | * @return Bounds|null |
||
95 | */ |
||
96 | 1 | public function getBounds() |
|
100 | |||
101 | /** |
||
102 | * @param float $south |
||
103 | * @param float $west |
||
104 | * @param float $north |
||
105 | * @param float $east |
||
106 | * |
||
107 | * @return CountryInfo |
||
108 | */ |
||
109 | 4 | public function setBounds(float $south, float $west, float $north, float $east): self |
|
121 | |||
122 | /** |
||
123 | * @return null|string |
||
124 | */ |
||
125 | 1 | public function getContinent() |
|
129 | |||
130 | /** |
||
131 | * @param null|string $continent |
||
132 | * |
||
133 | * @return CountryInfo |
||
134 | */ |
||
135 | 4 | public function withContinent(string $continent = null): self |
|
142 | |||
143 | /** |
||
144 | * @return null|string |
||
145 | */ |
||
146 | 2 | public function getCapital() |
|
150 | |||
151 | /** |
||
152 | * @param null|string $capital |
||
153 | * |
||
154 | * @return CountryInfo |
||
155 | */ |
||
156 | 4 | public function withCapital(string $capital = null): self |
|
163 | |||
164 | /** |
||
165 | * @return array |
||
166 | */ |
||
167 | 1 | public function getLanguages(): array |
|
171 | |||
172 | /** |
||
173 | * @param string $languages |
||
174 | * |
||
175 | * @return CountryInfo |
||
176 | */ |
||
177 | 4 | public function withLanguages(string $languages = ''): self |
|
184 | |||
185 | /** |
||
186 | * @return int|null |
||
187 | */ |
||
188 | 1 | public function getGeonameId() |
|
192 | |||
193 | /** |
||
194 | * @param int|null $geonameId |
||
195 | * |
||
196 | * @return CountryInfo |
||
197 | */ |
||
198 | 4 | public function withGeonameId(int $geonameId = null): self |
|
205 | |||
206 | /** |
||
207 | * @return null|string |
||
208 | */ |
||
209 | 1 | public function getIsoAlpha3() |
|
213 | |||
214 | /** |
||
215 | * @param null|string $isoAlpha3 |
||
216 | * |
||
217 | * @return CountryInfo |
||
218 | */ |
||
219 | 4 | public function withIsoAlpha3(string $isoAlpha3 = null): self |
|
226 | |||
227 | /** |
||
228 | * @return null|string |
||
229 | */ |
||
230 | 1 | public function getFipsCode() |
|
234 | |||
235 | /** |
||
236 | * @param null|string $fipsCode |
||
237 | * |
||
238 | * @return CountryInfo |
||
239 | */ |
||
240 | 4 | public function withFipsCode(string $fipsCode = null): self |
|
247 | |||
248 | /** |
||
249 | * @return int|null |
||
250 | */ |
||
251 | 1 | public function getPopulation() |
|
255 | |||
256 | /** |
||
257 | * @param int|null $population |
||
258 | * |
||
259 | * @return CountryInfo |
||
260 | */ |
||
261 | 4 | public function withPopulation(string $population = null): self |
|
268 | |||
269 | /** |
||
270 | * @return null|int |
||
271 | */ |
||
272 | 1 | public function getIsoNumeric() |
|
276 | |||
277 | /** |
||
278 | * @param string|null $isoNumeric |
||
279 | * |
||
280 | * @return CountryInfo |
||
281 | */ |
||
282 | 4 | public function withIsoNumeric(string $isoNumeric = null): self |
|
289 | |||
290 | /** |
||
291 | * @return null|float |
||
292 | */ |
||
293 | 1 | public function getAreaInSqKm() |
|
297 | |||
298 | /** |
||
299 | * @param string|null $areaInSqKm |
||
300 | * |
||
301 | * @return CountryInfo |
||
302 | */ |
||
303 | 4 | public function withAreaInSqKm(string $areaInSqKm = null): self |
|
310 | |||
311 | /** |
||
312 | * @return null|string |
||
313 | */ |
||
314 | 1 | public function getCountryCode() |
|
318 | |||
319 | /** |
||
320 | * @param string|null $countryCode |
||
321 | * |
||
322 | * @return CountryInfo |
||
323 | */ |
||
324 | 4 | public function withCountryCode(string $countryCode = null): self |
|
331 | |||
332 | /** |
||
333 | * @return null|string |
||
334 | */ |
||
335 | 1 | public function getCountryName() |
|
339 | |||
340 | /** |
||
341 | * @param string|null $countryName |
||
342 | * |
||
343 | * @return CountryInfo |
||
344 | */ |
||
345 | 4 | public function withCountryName(string $countryName = null): self |
|
352 | |||
353 | /** |
||
354 | * @return null|string |
||
355 | */ |
||
356 | 1 | public function getContinentName() |
|
360 | |||
361 | /** |
||
362 | * @param null|string $continentName |
||
363 | * |
||
364 | * @return CountryInfo |
||
365 | */ |
||
366 | 4 | public function withContinentName(string $continentName = null): self |
|
373 | |||
374 | /** |
||
375 | * @return null|string |
||
376 | */ |
||
377 | 1 | public function getCurrencyCode() |
|
381 | |||
382 | /** |
||
383 | * @param null|string $currencyCode |
||
384 | * |
||
385 | * @return CountryInfo |
||
386 | */ |
||
387 | 4 | public function withCurrencyCode(string $currencyCode = null): self |
|
394 | } |
||
395 |