| 1 | <?php |
||
| 5 | class Country |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Names |
||
| 9 | * |
||
| 10 | * @var array<string,string> |
||
| 11 | */ |
||
| 12 | private $names; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Alpha-2 country code |
||
| 16 | * |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $code; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Continent name |
||
| 23 | * |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private $continent; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Phone prefix |
||
| 30 | * |
||
| 31 | * @var float |
||
| 32 | */ |
||
| 33 | private $phonePrefix; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Currency code |
||
| 37 | * |
||
| 38 | * @var string |
||
| 39 | */ |
||
| 40 | private $currencyCode; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Country constructor |
||
| 44 | * |
||
| 45 | * @param array<string,string> $names |
||
| 46 | * @param string $code |
||
| 47 | * @param string $currencyCode |
||
| 48 | * @param float $phonePrefix |
||
| 49 | * @param string $continent |
||
| 50 | */ |
||
| 51 | 1 | public function __construct( |
|
| 64 | |||
| 65 | /** |
||
| 66 | * @return array<string,string> |
||
| 67 | */ |
||
| 68 | 1 | public function getNames(): array |
|
| 72 | |||
| 73 | /** |
||
| 74 | * @param string $locale |
||
| 75 | * |
||
| 76 | * @return string|null |
||
| 77 | */ |
||
| 78 | 1 | public function getName(string $locale): ?string |
|
| 82 | |||
| 83 | /** |
||
| 84 | * @return string |
||
| 85 | */ |
||
| 86 | 1 | public function getCode(): string |
|
| 90 | |||
| 91 | /** |
||
| 92 | * @return string |
||
| 93 | */ |
||
| 94 | 1 | public function getContinent(): string |
|
| 98 | |||
| 99 | /** |
||
| 100 | * @return float |
||
| 101 | */ |
||
| 102 | 1 | public function getPhonePrefix(): float |
|
| 106 | |||
| 107 | /** |
||
| 108 | * @return string |
||
| 109 | */ |
||
| 110 | 1 | public function getCurrencyCode(): string |
|
| 114 | |||
| 115 | /** |
||
| 116 | * @param array<string,mixed> $data |
||
| 117 | * |
||
| 118 | * @return \Inspirum\Balikobot\Model\Values\Country |
||
| 119 | */ |
||
| 120 | 1 | public static function newInstanceFromData(array $data): self |
|
| 133 | } |
||
| 134 |