Exception
8 months ago
Guards.php
8 months ago
ISO3166.php
8 months ago
ISO3166DataProvider.php
8 months ago
ISO3166DataValidator.php
8 months ago
ISO3166WithAliases.php
8 months ago
ISO3166DataProvider.php
63 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /* |
| 6 | * (c) Rob Bast <rob.bast@gmail.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view |
| 9 | * the LICENSE file that was distributed with this source code. |
| 10 | */ |
| 11 | |
| 12 | namespace Automattic\WooCommerce\Vendor\League\ISO3166; |
| 13 | |
| 14 | interface ISO3166DataProvider |
| 15 | { |
| 16 | /** |
| 17 | * Lookup ISO3166-1 data by name identifier. |
| 18 | * |
| 19 | * @api |
| 20 | * |
| 21 | * @throws \Automattic\WooCommerce\Vendor\League\ISO3166\Exception\OutOfBoundsException if input does not exist in dataset |
| 22 | * |
| 23 | * @return array<string, mixed> |
| 24 | */ |
| 25 | public function name(string $name): array; |
| 26 | |
| 27 | /** |
| 28 | * Lookup ISO3166-1 data by alpha2 identifier. |
| 29 | * |
| 30 | * @api |
| 31 | * |
| 32 | * @throws \Automattic\WooCommerce\Vendor\League\ISO3166\Exception\DomainException if input does not look like an alpha2 key |
| 33 | * @throws \Automattic\WooCommerce\Vendor\League\ISO3166\Exception\OutOfBoundsException if input does not exist in dataset |
| 34 | * |
| 35 | * @return array<string, mixed> |
| 36 | */ |
| 37 | public function alpha2(string $alpha2): array; |
| 38 | |
| 39 | /** |
| 40 | * Lookup ISO3166-1 data by alpha3 identifier. |
| 41 | * |
| 42 | * @api |
| 43 | * |
| 44 | * @throws \Automattic\WooCommerce\Vendor\League\ISO3166\Exception\DomainException if input does not look like an alpha3 key |
| 45 | * @throws \Automattic\WooCommerce\Vendor\League\ISO3166\Exception\OutOfBoundsException if input does not exist in dataset |
| 46 | * |
| 47 | * @return array<string, mixed> |
| 48 | */ |
| 49 | public function alpha3(string $alpha3): array; |
| 50 | |
| 51 | /** |
| 52 | * Lookup ISO3166-1 data by numeric identifier (numerical string, that is). |
| 53 | * |
| 54 | * @api |
| 55 | * |
| 56 | * @throws \Automattic\WooCommerce\Vendor\League\ISO3166\Exception\DomainException if input does not look like a numeric key |
| 57 | * @throws \Automattic\WooCommerce\Vendor\League\ISO3166\Exception\OutOfBoundsException if input does not exist in dataset |
| 58 | * |
| 59 | * @return array<string, mixed> |
| 60 | */ |
| 61 | public function numeric(string $numeric): array; |
| 62 | } |
| 63 |