{"id":13593308,"url":"https://github.com/PrinsFrank/standards","last_synced_at":"2025-04-09T02:33:13.964Z","repository":{"id":37009358,"uuid":"500933168","full_name":"PrinsFrank/standards","owner":"PrinsFrank","description":"A collection of standards as PHP Enums: ISO3166, ISO4217, ISO639...","archived":false,"fork":false,"pushed_at":"2024-10-21T20:30:06.000Z","size":2603,"stargazers_count":396,"open_issues_count":2,"forks_count":12,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-29T15:49:00.656Z","etag":null,"topics":["hacktoberfest","iso3166","iso3166-1","iso4217","iso639","iso639-1","iso639-2","standards"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PrinsFrank.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"PrinsFrank"}},"created_at":"2022-06-07T17:07:27.000Z","updated_at":"2024-10-23T04:39:05.000Z","dependencies_parsed_at":"2024-04-22T19:10:46.376Z","dependency_job_id":"7c5068aa-0562-47d7-95ac-13e9c069480b","html_url":"https://github.com/PrinsFrank/standards","commit_stats":{"total_commits":201,"total_committers":7,"mean_commits":"28.714285714285715","dds":0.2736318407960199,"last_synced_commit":"8bfce153300c6a79992570ddc9dbeceee0e33b85"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrinsFrank%2Fstandards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrinsFrank%2Fstandards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrinsFrank%2Fstandards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrinsFrank%2Fstandards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrinsFrank","download_url":"https://codeload.github.com/PrinsFrank/standards/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247386259,"owners_count":20930618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","iso3166","iso3166-1","iso4217","iso639","iso639-1","iso639-2","standards"],"created_at":"2024-08-01T16:01:19.002Z","updated_at":"2025-04-09T02:33:13.946Z","avatar_url":"https://github.com/PrinsFrank.png","language":"PHP","funding_links":["https://github.com/sponsors/PrinsFrank"],"categories":["PHP"],"sub_categories":[],"readme":"\u003cpicture\u003e\n    \u003csource srcset=\"https://github.com/PrinsFrank/standards/raw/main/docs/images/banner_dark.png\" media=\"(prefers-color-scheme: dark)\"\u003e\n    \u003cimg src=\"https://github.com/PrinsFrank/standards/raw/main/docs/images/banner_light.png\" alt=\"Banner\"\u003e\n\u003c/picture\u003e\n\n# Standards\n\n[![GitHub](https://img.shields.io/github/license/prinsfrank/standards)](https://github.com/PrinsFrank/standards/blob/main/LICENSE)\n[![PHP Version Support](https://img.shields.io/packagist/php-v/prinsfrank/standards)](https://github.com/PrinsFrank/standards/blob/main/composer.json)\n[![Packagist Downloads](https://img.shields.io/packagist/dt/prinsfrank/standards)](https://packagist.org/packages/prinsfrank/standards/stats)\n[![codecov](https://codecov.io/gh/PrinsFrank/standards/branch/main/graph/badge.svg?token=9O3VB563MU)](https://codecov.io/gh/PrinsFrank/standards)\n[![PHPStan Level](https://img.shields.io/badge/PHPStan-level%2010-brightgreen.svg?style=flat)](https://github.com/PrinsFrank/standards/blob/main/phpstan.neon)\n\n**A collection of standards as PHP Enums**\n\nDaily updated from their sources, whether it is ISO or IANA directly, or a maintaining party like the SIX Group or the US Library of Congress.\n\n## Setup\n\n\u003e **Note**\n\u003e Make sure you are running PHP 8.1 or higher to use this package\n\nTo start right away, run the following command in your composer project;\n\n```bash\ncomposer require prinsfrank/standards\n```\n\nOr for development only;\n\n```bash\ncomposer require prinsfrank/standards --dev\n```\n\n## Daily updated from their source\n\n[![Country](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-country.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-country.yml)\n[![Currency](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-currency.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-currency.yml)\n[![EU](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-eu.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-eu.yml)\n[![HTTP method](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-http-methods.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-http-methods.yml)\n[![HTTP Status code](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-http-status-codes.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-http-status-codes.yml)\n[![Language Extensive](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-language-extensive.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-language-extensive.yml)\n[![Language](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-language.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-language.yml)\n[![Language Subtag](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-language-sub-tag.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-language-sub-tag.yml)\n[![PHP Regex script](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-php-regex-scripts.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-php-regex-scripts.yml)\n[![Script](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-scripts.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-scripts.yml)\n[![TLD](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-tld.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-tld.yml)\n\n## How this package works\n\nThis package implements a bunch of specs as PHP Enums, so you can typehint them in methods. Currently, all specs are implemented as backed enums. That means that besides a name, they have also an internal 'value', either as an integer or a string.\n\nIn the Country, Currency and language specifications, there is also a relation between different enums. For example, the Alpha2 country code 'NL' is related to the Alpha3 'NLD', the numeric value '528' and the name 'Netherlands (the)'. Internally, these specs rely on the fact that the keys for these values are identical, so it is possible to convert between these.\n\n## Entities and their relations\n\nAll specifications in this package are closely related, except for the Http status code and methods. Not all relations are bidirectional though. For example, a language tag is build up of a language and optionally a country, but only a country cannot be converted to a language tag. \n\nBelow you can find an overview of all the relationships between specifications.\n\n```mermaid\nerDiagram\n    Country {\n        class CountryAlpha2\n        class CountryAlpha3\n        class CountryNumeric\n        class CountryName\n    }\n    GeographicRegion {\n        class GeographicRegion\n    }\n    CountryGroup {\n        class BRICS\n        class EEA\n        class EFTA\n        class EU\n        class NATO\n        class Schengen\n    }\n    CountryCallingCode {\n        class CountryCallingCode\n    }\n    CountrySubdivision {\n        class CountrySubdivision\n    }\n    Currency {\n        class CurrencyAlpha3\n        class CurrencyName\n        class CurrencyNumeric\n    }\n    CurrencySymbol {\n        class CurrencySymbol\n    }\n    NationalCallPrefix {\n        class NationalCallPrefix\n    }\n    InternationalCallPrefix {\n        class InternationalCallPrefix\n    }\n    Language {\n        class LanguageName\n        class LanguageAlpha2\n        class LanguageAlpha3Common\n        class LanguageAlpha3Bibliographic\n        class LanguageAlpha3Terminology\n        class LanguageAlpha3Extensive\n    }\n    Script {\n        class ScriptAlias\n        class ScriptCode\n        class ScriptName\n        class ScriptNumber\n    }\n    LanguageTag {\n        class LanguageTag\n        class LanguageTagVariant\n        class PrivateUsePrimarySubtag\n        class SingleCharacterSubtag\n    }\n    HttpMethod {\n        class HtppMethod\n    }\n    HttpStatusCode {\n        class HttpStatusCode\n    }\n    TLD {\n        class CountryCodeTLD\n        class GenericRestrictedTLD\n        class GenericTLD\n        class InfrastructureTLD\n        class SponsoredTLD\n        class TestTLD\n    }\n\n    Country ||--o{ CountrySubdivision: \"\"\n    Country ||--o{ Country: \"\"\n    GeographicRegion }|--o{ Country: \"\"\n    GeographicRegion ||--o{ GeographicRegion: \"\"\n    Language }o--o{ Country: \"\"\n    Country }|--o{ CountryGroup: \"\"\n    Country }|--o{ CountryCallingCode: \"\"\n    Country }o--o{ Currency: \"\"\n    Country }|--o{ NationalCallPrefix: \"\"\n    Country }|--o{ InternationalCallPrefix: \"\"\n    Currency }|--o| CurrencySymbol: \"\"\n    LanguageTag ||--o{ LanguageTag: \"\"\n    Language }|--o{ LanguageTag: \"\"\n    Script |o--o{ LanguageTag: \"\"\n    Country |o--o{ LanguageTag: \"\"\n    TLD ||--o| Country: \"\"\n    LanguageTag }o--o| GeographicRegion: \"\"\n```\n\n## Upgrading\n\nThis package adheres to [semver](https://semver.org/). This means that there are no breaking changes between minor releases (for example from 1.1 to 1.2), but that breaking changes are released as a major release (for example from 1.x to 2.x). To read about upgrading from one major release to the next, please refer to the [UPGRADING.md](./UPGRADING.md) file in the root of this project. \n\n## Some powerful use cases\n\n__Format a complete phone number string based on the users country;__\n![](https://github.com/PrinsFrank/standards/raw/main/docs/gifs/phone-formatting.gif)\n\n__Automatically select a supported language from an HTTP request;__\n![](https://github.com/PrinsFrank/standards/raw/main/docs/gifs/language-detection.gif)\n\n__Listing all country calling codes sorted by country name in a dropdown;__\n![](https://github.com/PrinsFrank/standards/raw/main/docs/gifs/country-calling-code-dropdown.gif)\n\n## Country (ISO3166-1)\n\n[![Daily country spec update](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-country.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-country.yml)\n\n\u003e :mortar_board: **Alpha2/3 country codes are always UPPERCASE to avoid confusion with language codes. It is recommended to use Alpha2/Alpha3 codes when exposing the specification in APIs**\n\n### At a glance\n\nAll the Alpha2, Alpha3, Numeric and Name values have a corresponding enum in the other country enums. These can be converted using their corresponding methods (toAlpha2, toAlpha3 etc...).\n\nCountry group membership can be checked by calling the `isMemberOf` method, supplying the FQN of a class that implements the `GroupInterface`. Several country groups are available: BRICS, EEA, EFTA etc. Countries can also have subdivisions, which can be of several types: countries, provinces, etc.\n\n```php\nuse PrinsFrank\\Standards\\Country\\CountryAlpha2;\nuse PrinsFrank\\Standards\\Country\\CountryAlpha3;\nuse PrinsFrank\\Standards\\Country\\CountryNumeric;\n\nCountryAlpha2::from('NL');                                      // CountryAlpha2::Netherlands\nCountryNumeric::from('528');                                    // CountryNumeric::Netherlands\nCountryNumeric::fromInt(528);                                   // CountryNumeric::Netherlands\nCountryAlpha3::from('NLD');                                     // CountryAlpha3::Netherlands\nCountryAlpha3::from('NLD')-\u003evalue;                              // 'NLD'\nCountryAlpha3::from('NLD')-\u003ename;                               // 'Netherlands'\nCountryAlpha3::from('NLD')-\u003etoCountryAlpha2()-\u003evalue;           // 'NL'\nCountryAlpha3::from('NLD')-\u003etoCountryNumeric()-\u003evalue;          // '528'\nCountryAlpha3::from('NLD')-\u003etoCountryNumeric()-\u003evalueAsInt();   // 528\nCountryAlpha3::from('NLD')-\u003eisMemberOf(EU::class);              // true\nCountryAlpha2::Netherlands;                                     // CountryAlpha2::Netherlands\n\nCountryAlpha2::Vanuatu-\u003egetSubdivisions();                      // [CountrySubdivision::Vanuatu_province_Malampa, CountrySubdivision::Vanuatu_province_Penama, CountrySubdivision::Vanuatu_province_Sanma, CountrySubdivision::Vanuatu_province_Shefa, CountrySubdivision::Vanuatu_province_Tafea, CountrySubdivision::Vanuatu_province_Torba]\n\nCountryAlpha2::Aruba-\u003egetParentCountry();                       // CountryAlpha2::Netherlands\nCountryAlpha2::Netherlands-\u003egetSubCountries();                  // [CountryAlpha2::Aruba, CountryAlpha2::Curacao, CountryAlpha2::Sint_Maarten_Dutch_part, CountryAlpha2::Bonaire_Sint_Eustatius_and_Saba]\n\nCountryAlpha3::from('NLD')-\u003egetCountryCallingCodes();           // [CountryCallingCode::Netherlands_Kingdom_of_the]\nCountryAlpha3::from('NLD')-\u003egetCountryCallingCodes()[0]-\u003evalue; // 31\n\nCountryAlpha3::from('NLD')-\u003egetInternationalCallPrefix();        // InternationalCallPrefix::_00\nCountryAlpha3::from('NLD')-\u003egetInternationalCallPrefix()-\u003evalue; // '00'\n\nCountryAlpha3::from('NLD')-\u003egetNationalCallPrefix();             // NationalCallPrefix::_0\nCountryAlpha3::from('NLD')-\u003egetNationalCallPrefix()-\u003evalue;      // '0'\n\nCountryAlpha3::from('NLD')-\u003egetFlagEmoji();                      // '🇳🇱' (This might not be displayed correctly in this readme if you're on windows, see 'https://prinsfrank.nl/2021/01/25/Non-existing-flag-emojis-on-windows to make these flag emojis visible for Windows users.')\nCountryAlpha3::from('NLD')-\u003egetCurrenciesAlpha3();               // [CurrencyAlpha3::Euro]\nCountryAlpha3::from('NLD')-\u003egetOfficialAndDeFactoLanguages();    // [LanguageAlpha2::Dutch_Flemish]\n\nCountryAlpha3::from('NLD')-\u003egetNameInLanguage(LanguageAlpha2::Dutch_Flemish): // 'Nederland'\nCountryAlpha3::from('NLD')-\u003egetNameInLanguage(LanguageAlpha2::English):       // 'Netherlands'\n\nCountryAlpha3::from('NLD')-\u003eformatNumber(42.42, LanguageAlpha2::Dutch_Flemish); // '42,42'\n\npublic function foo(CountryAlpha2 $countryAlpha2) {}             // Use spec as typehint to enforce valid value\n\n```\n\n\u003cdetails\u003e\n    \u003csummary\u003eFull documentation\u003c/summary\u003e\n\n```mermaid\nerDiagram\n    CountryAlpha3 ||--|| CountryName: equals\n    CountryAlpha3 ||--|| CountryAlpha2: equals\n    CountryAlpha3 ||--|| CountryNumeric: equals\n\n    CountryNumeric ||--|| CountryName: equals\n\n    CountryName ||--|| CountryAlpha2: equals\n    CountryNumeric ||--|| CountryAlpha2: eguals\n\n    CountryAlpha2 {\n        Netherlands NL\n    }\n\n    CountryAlpha3 {\n        Netherlands NLD\n    }\n\n    CountryNumeric {\n        Netherlands _528\n    }\n\n    CountryName {\n        Netherlands Netherlands_(Kingdom_of_the)\n    }\n    \n    CountrySubdivision {\n        Caribbean_Netherlands_special_municipality_Bonaire BG-BO \n    }\n\n    CountryAlpha2 }o--o| Brics: isMemberOf\n    CountryAlpha2 }o--o| EEA: isMemberOf\n    CountryAlpha2 }o--o| EFTA: isMemberOf\n    CountryAlpha2 }o--o| EU: isMemberOf\n    CountryAlpha2 }o--o| NATO: isMemberOf\n    CountryAlpha2 }o--o| Schengen: isMemberOf\n    CountrySubdivision }o--|| CountryAlpha2: isPartOf\n```\n\n### CountryAlpha2\n\n```php\nuse PrinsFrank\\Standards\\Country\\CountryAlpha2;\nuse PrinsFrank\\Standards\\Country\\Groups\\EU;\nuse PrinsFrank\\Standards\\Country\\Groups\\Brics;\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha2;\n\n$valueAlpha2 = CountryAlpha2::from('NL');         // CountryAlpha2::Netherlands\n$value = $valueAlpha2-\u003evalue;                     // 'NL'\n$lowerCaseValue = $valueAlpha2-\u003elowerCaseValue(); // 'nl'\n$valueName = $valueAlpha2-\u003ename;                  // 'Netherlands'\n$valueAlpha3 = $valueAlpha2-\u003etoCountryAlpha3();   // CountryAlpha3::Netherlands\n$valueNumeric = $valueAlpha2-\u003etoCountryNumeric(); // CountryNumeric::Netherlands\n\n$isMemberOfEu = $valueAlpha2-\u003eisMemberOf(EU::class);       // true\n$isMemberOfBrics = $valueAlpha2-\u003eisMemberOf(Brics::class); // false\n\n$valueAlpha2-\u003egetCountryCallingCodes();           // [CountryCallingCode::Netherlands_Kingdom_of_the]\n$valueAlpha2-\u003egetCountryCallingCodes()[0]-\u003evalue; // 31\n\n$valueAlpha2-\u003egetInternationalCallPrefix();        // InternationalCallPrefix::_00\n$valueAlpha2-\u003egetInternationalCallPrefix()-\u003evalue; // '00'\n\n$valueAlpha2-\u003egetNationalCallPrefix();             // NationalCallPrefix::_0\n$valueAlpha2-\u003egetNationalCallPrefix()-\u003evalue;      // '0'\n\n$valueAlpha2::from('NL')-\u003egetFlagEmoji();         // '🇳🇱' (This might not be displayed correctly in this readme if you're on windows, see 'https://prinsfrank.nl/2021/01/25/Non-existing-flag-emojis-on-windows to make these flag emojis visible for Windows users.')\n\n$valueAlpha2-\u003egetCurrenciesAlpha3();               // [CurrencyAlpha3::Euro]\n\n$valueAlpha2-\u003egetOfficialAndDeFactoLanguages();    // [LanguageAlpha2::Dutch_Flemish]\n\n$valueAlpha2-\u003egetNameInLanguage(LanguageAlpha2::Dutch_Flemish): // 'Nederland'\n$valueAlpha2-\u003egetNameInLanguage(LanguageAlpha2::English):       // 'Netherlands'\n\n$valueAlpha2-\u003eformatNumber(42.42, LanguageAlpha2::Dutch_Flemish); // '42,42'\n```\n\n### CountryAlpha3\n\n```php\nuse PrinsFrank\\Standards\\Country\\CountryAlpha3;\nuse PrinsFrank\\Standards\\Country\\Groups\\EU;\nuse PrinsFrank\\Standards\\Country\\Groups\\Brics;\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha2;\n\n$valueAlpha3 = CountryAlpha3::from('NLD');        // CountryAlpha3::Netherlands\n$value = $valueAlpha3-\u003evalue;                     // 'NLD'\n$valueName = $valueAlpha3-\u003ename;                  // 'Netherlands'\n$valueAlpha2 = $valueAlpha3-\u003etoCountryAlpha2();   // CountryAlpha2::Netherlands\n$valueNumeric = $valueAlpha3-\u003etoCountryNumeric(); // CountryNumeric::Netherlands\n\n$isMemberOfEu = $valueAlpha3-\u003eisMemberOf(EU::class);       // true\n$isMemberOfBrics = $valueAlpha3-\u003eisMemberOf(Brics::class); // false\n\n$valueAlpha3-\u003egetCountryCallingCodes();           // [CountryCallingCode::Netherlands_Kingdom_of_the]\n$valueAlpha3-\u003egetCountryCallingCodes()[0]-\u003evalue; // 31\n\n$valueAlpha3-\u003egetInternationalCallPrefix();        // InternationalCallPrefix::_00\n$valueAlpha3-\u003egetInternationalCallPrefix()-\u003evalue; // '00'\n\n$valueAlpha3-\u003egetNationalCallPrefix();             // NationalCallPrefix::_0\n$valueAlpha3-\u003egetNationalCallPrefix()-\u003evalue;      // '0'\n\n$valueAlpha3-\u003egetFlagEmoji();                      // '🇳🇱' (This might not be displayed correctly in this readme if you're on windows, see 'https://prinsfrank.nl/2021/01/25/Non-existing-flag-emojis-on-windows to make these flag emojis visible for Windows users.')\n\n$valueAlpha3-\u003egetCurrenciesAlpha3();               // [CurrencyAlpha3::Euro]\n\n$valueAlpha3-\u003egetOfficialAndDeFactoLanguages();    // [LanguageAlpha2::Dutch_Flemish]\n\n$valueAlpha3-\u003egetNameInLanguage(LanguageAlpha2::Dutch_Flemish): // 'Nederland'\n$valueAlpha3-\u003egetNameInLanguage(LanguageAlpha2::English):       // 'Netherlands'\n\n$valueAlpha2-\u003eformatNumber(42.42, LanguageAlpha2::Dutch_Flemish); // '42,42'\n```\n\n### CountryNumeric\n\n```php\nuse PrinsFrank\\Standards\\Country\\CountryNumeric;\nuse PrinsFrank\\Standards\\Country\\Groups\\EU;\nuse PrinsFrank\\Standards\\Country\\Groups\\Brics;\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha2;\n\n$valueNumeric = CountryNumeric::from('528');     // CountryNumeric::Netherlands\n$valueNumeric = CountryNumeric::fromInt(528);    // CountryNumeric::Netherlands\n$value = $valueNumeric-\u003evalue;                   // '528'\n$valueName = $valueNumeric-\u003ename;                // 'Netherlands'\n$valueAlpha2 = $valueNumeric-\u003etoCountryAlpha2(); // CountryAlpha2::Netherlands\n$valueAlpha3 = $valueNumeric-\u003etoCountryAlpha3(); // CountryAlpha3::Netherlands\n\n$isMemberOfEu = $valueNumeric-\u003eisMemberOf(EU::class);       // true\n$isMemberOfBrics = $valueNumeric-\u003eisMemberOf(Brics::class); // false\n\n$valueNumeric-\u003egetCountryCallingCodes();           // [CountryCallingCode::Netherlands_Kingdom_of_the]\n$valueNumeric-\u003egetCountryCallingCodes()[0]-\u003evalue; // 31\n\n$valueNumeric-\u003egetInternationalCallPrefix();        // InternationalCallPrefix::_00\n$valueNumeric-\u003egetInternationalCallPrefix()-\u003evalue; // '00'\n\n$valueNumeric-\u003egetNationalCallPrefix();             // NationalCallPrefix::_0\n$valueNumeric-\u003egetNationalCallPrefix()-\u003evalue;      // '0'\n\n$valueNumeric-\u003egetFlagEmoji();                      // '🇳🇱' (This might not be displayed correctly in this readme if you're on windows, see 'https://prinsfrank.nl/2021/01/25/Non-existing-flag-emojis-on-windows to make these flag emojis visible for Windows users.')\n\n$valueNumeric-\u003egetCurrenciesAlpha3();               // [CurrencyAlpha3::Euro]\n\n$valueNumeric-\u003egetOfficialAndDeFactoLanguages();    // [LanguageAlpha2::Dutch_Flemish]\n\n$valueNumeric-\u003egetNameInLanguage(LanguageAlpha2::Dutch_Flemish): // 'Nederland'\n$valueNumeric-\u003egetNameInLanguage(LanguageAlpha2::English):       // 'Netherlands'\n\n$valueAlpha2-\u003eformatNumber(42.42, LanguageAlpha2::Dutch_Flemish); // '42,42'\n```\n\n### CountrySubdivision\n\n```php\nuse PrinsFrank\\Standards\\Country\\Subdivision\\CountrySubdivision;\n\n$subdivision = CountrySubdivision::from('VU-MAP');           // CountrySubdivision::Vanuatu_province_Malampa\n$subdivision = CountrySubdivision::Vanuatu_province_Malampa; // CountrySubdivision::Vanuatu_province_Malampa\n\n$subdivision-\u003egetPartOfCountry();                            // CountryAlpha2::Vanuatu\n\n$subdivision-\u003egetNames();                                    // [new ('Malampa', [LanguageAlpha2::French, LanguageAlpha2::English], null, null)]\n\n$subdivision-\u003egetSameAsCountry();                            // null\n```\n\n### \u003cs\u003eCountryName\u003c/s\u003e (Deprecated)\n\n```php\nuse PrinsFrank\\Standards\\Country\\CountryName;\nuse PrinsFrank\\Standards\\Country\\Groups\\EU;\nuse PrinsFrank\\Standards\\Country\\Groups\\Brics;\n\n$valueName = CountryName::from('Netherlands (Kingdom of the)'); // CountryName::Netherlands\n$value = $valueName-\u003evalue;                                     // 'Netherlands (Kingdom of the)'\n$valueName = $valueName-\u003ename;                                  // 'Netherlands'\n$valueAlpha2 = $valueName-\u003etoCountryAlpha2();                   // CountryAlpha2::Netherlands\n$valueAlpha3 = $valueName-\u003etoCountryAlpha3();                   // CountryAlpha3::Netherlands\n$valueNumeric = $valueName-\u003etoCountryNumeric();                 // CountryNumeric::Netherlands\n\n$isMemberOfEu = $valueName-\u003eisMemberOf(EU::class);       // true\n$isMemberOfBrics = $valueName-\u003eisMemberOf(Brics::class); // false\n\n$valueName-\u003egetCountryCallingCodes();           // [CountryCallingCode::Netherlands_Kingdom_of_the]\n$valueName-\u003egetCountryCallingCodes()[0]-\u003evalue; // 31\n\n$valueName-\u003egetInternationalCallPrefix();        // InternationalCallPrefix::_00\n$valueName-\u003egetInternationalCallPrefix()-\u003evalue; // '00'\n\n$valueName-\u003egetNationalCallPrefix();             // NationalCallPrefix::_0\n$valueName-\u003egetNationalCallPrefix()-\u003evalue;      // '0'\n\n$valueName-\u003egetFlagEmoji();                      // '🇳🇱' (This might not be displayed correctly in this readme if you're on windows, see 'https://prinsfrank.nl/2021/01/25/Non-existing-flag-emojis-on-windows to make these flag emojis visible for Windows users.')\n\n$valueName-\u003egetCurrenciesAlpha3();               // [CurrencyAlpha3::Euro]\n\n$valueName-\u003egetOfficialAndDeFactoLanguages();    // [LanguageAlpha2::Dutch_Flemish]\n```\n\n\u003c/details\u003e\n\n## Country Calling Codes (ITU-T E.164)\n\n\u003e :mortar_board: **Country calling codes can be anywhere from 1 to 3 digits, and can span several countries. There are no leading zeros in this specification.**\n\n### At a glance\n\nCountry calling codes are quite straight forward. One country can have multiple country calling codes though, And one country calling code can span multiple countries. That's why the `forCountry` and `getCountriesAlpha2` both return an array of country calling codes/countries and not a single item.\n\n```php\nuse PrinsFrank\\Standards\\Country\\CountryAlpha2;\nuse PrinsFrank\\Standards\\CountryCallingCode\\CountryCallingCode;\n\nCountryCallingCode::from(1);                    // CountryCallingCode::Integrated_numbering_plan\nCountryCallingCode::from(31);                   // CountryCallingCode::Netherlands_Kingdom_of_the\nCountryCallingCode::from(31)-\u003evalue;            // 31\nCountryCallingCode::from(31)-\u003ename;             // 'Netherlands_Kingdom_of_the'\nCountryCallingCode::Netherlands_Kingdom_of_the; // CountryCallingCode::Netherlands_Kingdom_of_the\n\nCountryCallingCode::from(31)-\u003egetCountriesAlpha2(); // [CountryAlpha2::Netherlands]\nCountryCallingCode::from(7)-\u003egetCountriesAlpha2();  // [CountryAlpha2::Kazakhstan, CountryAlpha2::Russian_Federation]\n\nCountryCallingCode::forCountry(CountryAlpha2::Netherlands); // [CountryCallingCode::Netherlands_Kingdom_of_the]\n\npublic function foo(CountryCallingCode $countryCallingCode) {} // Use spec as typehint to enforce valid value\n```\n\n## Currency (ISO4217)\n\n[![Daily currency spec update](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-currency.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-currency.yml)\n\n\u003e :mortar_board: **Alpha3 codes are uppercase. When communicating or storing currencies, it is recommended to do so using the Alpha3 or Numeric representation.**\n\n### At a glance\n\nAll the Alpha3, Numeric and Name values have a corresponding enum in the other currency enums. These can be converted using their corresponding methods (toCurrencyAlpha3, etc...). A fourth enum is available that maps all currencies to a currency symbol, that can be accessed by calling the 'getSymbol' method.\n\n```php\nuse PrinsFrank\\Standards\\Country\\CountryAlpha2;\nuse PrinsFrank\\Standards\\Currency\\CurrencyAlpha3;\nuse PrinsFrank\\Standards\\Currency\\CurrencyName;\nuse PrinsFrank\\Standards\\Currency\\CurrencyNumeric;\nuse PrinsFrank\\Standards\\Currency\\CurrencySymbol;\n\nCurrencyAlpha3::from('EUR');                               // CurrencyAlpha3::Euro\nCurrencyAlpha3::from('EUR')-\u003evalue;                        // 'EUR'\nCurrencyAlpha3::from('EUR')-\u003elowercaseValue();             // 'eur'\nCurrencyAlpha3::from('EUR')-\u003etoCurrencyName()-\u003evalue;      // 'Euro'\nCurrencyAlpha3::from('EUR')-\u003egetSymbol();                  // CurrencySymbol::Euro\nCurrencyAlpha3::from('EUR')-\u003egetSymbol()-\u003evalue;           // '€'\nCurrencyAlpha3::from('EUR')-\u003etoCurrencyNumeric()-\u003evalue;   // '978'\nCurrencyAlpha3::from('EUR')-\u003egetMinorUnits();              // 2\nCurrencyNumeric::from('978');                              // CurrencyNumeric::Euro\nCurrencyNumeric::fromInt(978);                             // CurrencyNumeric::Euro\nCurrencyNumeric::from('978')-\u003evalue;                       // '978'\nCurrencyNumeric::from('978')-\u003evalueAsInt();                // 978\nCurrencySymbol::from('€');                                 // CurrencySymbol::Euro\nCurrencySymbol::from('€')-\u003evalue;                          // '€'\nCurrencySymbol::forCurrency(CurrencyAlpha3::Euro);         // CurrencySymbol::Euro\nCurrencySymbol::forCurrency(CurrencyNumeric::Euro);        // CurrencySymbol::Euro\nCurrencySymbol::forCurrency(CurrencyName::Euro);           // CurrencySymbol::Euro\nCurrencySymbol::forCurrency(CurrencyNumeric::from('978')); // CurrencySymbol::Euro\nCurrencyAlpha3::Euro;                                      // CurrencyAlpha3::Euro\n\nCurrencyAlpha3::Euro-\u003eformat(42.42, CountryAlpha2::Netherlands);                                // '€ 42,42'\nCurrencyAlpha3::Euro-\u003eformat(42.42, CountryAlpha2::Netherlands, LanguageAlpha2::Dutch_Flemish); // '€ 42,42'\n\nCurrencyAlpha3::Norwegian_Krone-\u003egetCountriesAlpha2();     // [CountryAlpha2::Bouvet_Island, CountryAlpha2::Norway, CountryAlpha2::Svalbard_Jan_Mayen]\n\npublic function foo(CurrencyAlpha3 $currencyAlpha3) {}     // Use spec as typehint to enforce valid value\n```\n\n\u003cdetails\u003e\n    \u003csummary\u003eFull documentation\u003c/summary\u003e\n\n```mermaid\nclassDiagram\n    direction LR\n    class CurrencyAlpha3 {\n        +String value [EUR]\n        from(string $value) self\n        tryfrom(string $value) self|null\n        toCurrencyName()\n        toCurrencyNumeric()\n        getSymbol()\n    }\n    class CurrencyName {\n        +String value [Euro]\n        from(string $value) self\n        tryfrom(string $value) self|null\n        toCurrencyName()\n        toCurrencyNumeric()\n        getSymbol()\n    }\n    class CurrencyNumeric {\n        +String value [978]\n        from(string $value) self\n        tryfrom(string $value) self|null\n        toCurrencyAlpha3()\n        toCurrencyName()\n        getSymbol()\n    }\n    class CurrencySymbol {\n        +String value [€]\n        forCurrency(CurrencyAlpha3|CurrencyName|CurrencyNumeric $value) self|null\n    }\n    \n    CurrencyName \u003c--\u003e CurrencyNumeric: toXXX()\n    CurrencyName \u003c--\u003e CurrencyAlpha3: toXXX()\n    CurrencyNumeric \u003c--\u003e CurrencyAlpha3: toXXX()\n    \n    CurrencyName --\u003e CurrencySymbol: getSymbol\n    CurrencyAlpha3 --\u003e CurrencySymbol: getSymbol\n    CurrencyNumeric --\u003e CurrencySymbol: getSymbol\n```\n\n### CurrencyAlpha3\n\n```php\nuse PrinsFrank\\Standards\\Country\\CountryAlpha2;\nuse PrinsFrank\\Standards\\Currency\\CurrencyAlpha3;\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha2;\n\n$currencyAlpha3 = CurrencyAlpha3::from('EUR');         // CurrencyAlpha3::Euro\n$value = $currencyAlpha3-\u003evalue;                       // 'EUR'\n$value = $currencyAlpha3-\u003elowercaseValue();            // 'eur'\n$valueName = $currencyAlpha3-\u003ename;                    // 'Euro'\n$minorUnits = $currencyAlpha3-\u003egetMinorUnits();        // 2\n$valueNumeric = $currencyAlpha3-\u003etoCurrencyNumeric();  // CurrencyNumeric::Euro\n$valueName = $currencyAlpha3-\u003etoCurrencyName();        // CurrencyName::Euro\n$valueName = $currencyAlpha3-\u003etoCurrencyName()-\u003evalue; // 'Euro'\n$valueSymbol = $currencyAlpha3-\u003egetSymbol();           // CurrencySymbol::Euro\n$valueSymbol = $currencyAlpha3-\u003egetSymbol()-\u003evalue;    // '€'\n$countries = $currencyAlpha2-\u003egetCountriesAlpha2();    // [CountryAlpha2::Bouvet_Island, CountryAlpha2::Norway, CountryAlpha2::Svalbard_Jan_Mayen]\n\n$currencyAlpha3-\u003eformat(42.42, CountryAlpha2::Netherlands);                                // '€ 42,42'\n$currencyAlpha3-\u003eformat(42.42, CountryAlpha2::Netherlands, LanguageAlpha2::Dutch_Flemish); // '€ 42,42'\n```\n\n### CurrencyNumeric\n\n```php\nuse PrinsFrank\\Standards\\Currency\\CurrencyNumeric;\nuse PrinsFrank\\Standards\\Country\\CountryAlpha2;\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha2;\n\n$currencyNumeric = CurrencyNumeric::from('978');        // CurrencyNumeric::Euro\n$currencyNumeric = CurrencyNumeric::fromInt(978);       // CurrencyNumeric::Euro\n$value = $currencyNumeric-\u003evalue;                       // '978'\n$value = $currencyNumeric-\u003evalueAsInt();                // 978\n$valueName = $currencyNumeric-\u003ename;                    // 'Euro'\n$minorUnits = $currencyNumeric-\u003egetMinorUnits();        // 2\n$valueAlpha3 = $currencyNumeric-\u003etoCurrencyAlpha3();    // CurrencyAlpha3::Euro\n$valueName = $currencyNumeric-\u003etoCurrencyName();        // CurrencyName::Euro\n$valueName = $currencyNumeric-\u003etoCurrencyName()-\u003evalue; // 'Euro'\n$valueSymbol = $currencyNumeric-\u003egetSymbol();           // CurrencySymbol::Euro\n$valueSymbol = $currencyNumeric-\u003egetSymbol()-\u003evalue;    // '€'\n$countries = $currencyNumeric-\u003egetCountriesAlpha2();    // [CountryAlpha2::Bouvet_Island, CountryAlpha2::Norway, CountryAlpha2::Svalbard_Jan_Mayen]\n\n$currencyNumeric-\u003eformat(42.42, CountryAlpha2::Netherlands);                                // '€ 42,42'\n$currencyNumeric-\u003eformat(42.42, CountryAlpha2::Netherlands, LanguageAlpha2::Dutch_Flemish); // '€ 42,42'\n```\n\n### CurrencySymbol\n\n```php\nuse PrinsFrank\\Standards\\Currency\\CurrencyAlpha3;\nuse PrinsFrank\\Standards\\Currency\\CurrencySymbol;\n\n$currencySymbol = CurrencySymbol::from('€');                        // CurrencySymbol::Euro\n$currencySymbol =  $currencySymbol-\u003ename;                           // 'Euro'\n$currencySymbol =  $currencySymbol-\u003evalue;                          // '€'\n$currencySymbol = CurrencySymbol::forCurrency(CurrencyAlpha3::Euro) // CurrencySymbol::Euro\n```\n\n### CurrencyName\n\n```php\nuse PrinsFrank\\Standards\\Currency\\CurrencyName;\nuse PrinsFrank\\Standards\\Country\\CountryAlpha2;\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha2;\n\n$currencyName = CurrencyName::from('Euro');        // CurrencyName::Euro \n$currencyName = CurrencyName::Euro;                // CurrencyName::Euro\n$name = $currencyName-\u003ename;                       // 'Euro'\n$value = $currencyName-\u003evalue;                     // 'Euro'\n$minorUnits = $currencyName-\u003egetMinorUnits();      // 2\n$valueAlpha3 = $currencyName-\u003etoCurrencyAlpha3();  // CurrencyAlpha3::Euro\n$valueAlpha3 = $currencyName-\u003etoCurrencyNumeric(); // CurrencyNumeric::Euro\n$countries = $currencyName-\u003egetCountriesAlpha2();  // [CountryAlpha2::Bouvet_Island, CountryAlpha2::Norway, CountryAlpha2::Svalbard_Jan_Mayen]\n\n$currencyName-\u003eformat(42.42, CountryAlpha2::Netherlands);                                // '€ 42,42'\n$currencyName-\u003eformat(42.42, CountryAlpha2::Netherlands, LanguageAlpha2::Dutch_Flemish); // '€ 42,42'\n```\n\n\n\u003c/details\u003e\n\n## HTTP Methods\n\n[![Daily HTTP method spec update](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-http-methods.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-http-methods.yml)\n\n### At a glance\n\n```php\nuse PrinsFrank\\Standards\\Http\\HttpMethod;\n\nHttpMethod::from('POST');        // HttpMethod::Post\nHttpMethod::from('POST')-\u003evalue; // 'POST'\nHttpMethod::from('POST')-\u003ename;  // Post\nHttpMethod::Post;                // HttpMethod::Post\n\npublic function foo(HttpMethod $httpMethod) {} // Use spec as typehint to enforce valid value\n```\n\n## HTTP Status Codes\n\n[![Daily HTTP Status code spec update](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-http-status-codes.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-http-status-codes.yml)\n\n### At a glance\n\n```php\nuse PrinsFrank\\Standards\\Http\\HttpStatusCode;\n\nHttpStatusCode::from(404);       // HttpStatusCode::Not_Found\nHttpStatusCode::from(404-\u003evalue; // 404\nHttpStatusCode::from(404-\u003ename;  // Not_Found\nHttpStatusCode::Not_Found;       // HttpStatusCode::Not_Found\n\npublic function foo(HttpStatusCode $httpStatusCode) {} // Use spec as typehint to enforce valid value\n```\n\nThere can be status codes that are temporarily assigned. Those are marked with the `TemporaryAssignment` attribute. To check if a specific case is temporarily assigned, you can use the `isTemporaryAssignment` method which returns a boolean, or `getTemporaryAssignmentExpiresAt` which returns a DateTimeImmutable or null.\n\n## International Call Prefixes (ITU-T E.164)\n\nDifferent countries have different international call prefixes. This is a spec extracted from ITU-T E.164 listing all possible international call prefixes.\n\n### At a glance\n\n```php\nuse PrinsFrank\\Standards\\InternationalCallPrefix\\InternationalCallPrefix;\nuse PrinsFrank\\Standards\\Country\\CountryAlpha2;\nuse PrinsFrank\\Standards\\Country\\CountryAlpha3;\nuse PrinsFrank\\Standards\\Country\\CountryName;\nuse PrinsFrank\\Standards\\Country\\CountryNumeric;\n\nInternationalCallPrefix::from('0');                // InternationalCallPrefix::_0\nInternationalCallPrefix::from('0')-\u003evalue;         // '0'\nInternationalCallPrefix::from('0')-\u003ename;          // '_0'\nInternationalCallPrefix::_0;                       // InternationalCallPrefix::_0\nInternationalCallPrefix::_0-\u003egetCountriesAlpha2(); // [CountryAlpha2::Samoa]\n\nInternationalCallPrefix::forCountry(CountryAlpha2::Netherlands);  // InternationalCallPrefix::_00\nInternationalCallPrefix::forCountry(CountryAlpha3::Netherlands);  // InternationalCallPrefix::_00\nInternationalCallPrefix::forCountry(CountryNumeric::Netherlands); // InternationalCallPrefix::_00\nInternationalCallPrefix::forCountry(CountryName::Netherlands);    // InternationalCallPrefix::_00\n\npublic function foo(InternationalCallPrefix $internationalCallPrefix) {} // Use spec as typehint to enforce valid value\n```\n\n## Language (ISO639)\n\n[![Daily language spec update](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-language.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-language.yml)\n[![Daily Language Extensive update](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-language-extensive.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-language-extensive.yml)\n\n\u003e :mortar_board: **Language codes are always in lowercase to avoid confusion with country codes.**\n\n\u003e :mortar_board: **The alpha2 specification has 184 languages, the alpha3 Bibliographic/Terminology specification has 486 languages and the alpha3 Extensive specification has 7908 languages.**\n\n\u003e :mortar_board: **If you have to choose between the alpha3 Bibliographic and Terminology specification, the Terminology specification is more widely used.**\n\n### At a glance\n\nThere are four language code specifications:\n- 184 Language Alpha2 (ISO 639-1)\n- 486 Language Alpha3 Bibliographic (ISO 639-2)\n- 486 Language Alpha3 Terminology (ISO 639-2)\n- 7908 Language Alpha3 Extensive (ISO 639-3)\n\nAs you see, the Bibliographic and Terminology specifications have an identical number of languages, so there is a one-to-one relation between these.\n\n```php\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha2;\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha3Terminology;\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha3Extensive;\n\nLanguageAlpha2::from('nl');                                         // LanguageAlpha2::Dutch_Flemish\nLanguageAlpha2::from('nl')-\u003evalue;                                  // 'nl'\nLanguageAlpha2::from('nl')-\u003ename;                                   // 'Dutch_Flemish'\nLanguageAlpha2::from('nl')-\u003etoLanguageAlpha3Bibliographic();        // LanguageAlpha3Bibliographic::Dutch_Flemish\nLanguageAlpha2::from('nl')-\u003etoLanguageAlpha3Bibliographic()-\u003evalue; // 'dut'\nLanguageAlpha2::from('nl')-\u003etoLanguageAlpha3Terminology();          // LanguageAlpha3Terminology::Dutch_Flemish\nLanguageAlpha2::from('nl')-\u003etoLanguageAlpha3Terminology()-\u003evalue;   // 'nld'\nLanguageAlpha2::from('nl')-\u003etoLanguageName()-\u003evalue;                // 'Dutch; Flemish'\n\nLanguageAlpha3Terminology::from('nld');                             // LanguageAlpha3Terminology::Dutch_Flemish\nLanguageAlpha3Bibliographic::from('dut');                           // LanguageAlpha3Bibliographic::Dutch_Flemish\n\nLanguageAlpha3Extensive::from('nld');                               // LanguageAlpha3Extensive::Dutch\nLanguageAlpha3Extensive::from('dse');                               // LanguageAlpha3Extensive::Dutch_Sign_Language\n\nLanguageAlpha2::Dutch_Flemish-\u003egetNameInLanguage(LanguageAlpha2::Dutch_Flemish); // 'Nederlands'\nLanguageAlpha2::Dutch_Flemish-\u003egetNameInLanguage(LanguageAlpha2::English);       // 'Dutch'\n\npublic function foo(LanguageAlpha2 $languageAlpha2);                // Use spec as typehint to enforce valid value\n```\n\n\u003cdetails\u003e\n    \u003csummary\u003eFull documentation\u003c/summary\u003e\n\n### LanguageAlpha2 (ISO 639-1)\n\n```php\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha2;\n\n$valueAlpha2 = LanguageAlpha2::from('nl');                                 // LanguageAlpha2::Dutch_Flemish\n$value = $valueAlpha2-\u003evalue;                                              // 'nl'\n$valueName = $valueAlpha2-\u003ename;                                           // 'Dutch_Flemish'\n$valueAlpha3Bibliographic = $valueAlpha2-\u003etoLanguageAlpha3Bibliographic(); // LanguageAlpha3Bibliographic::Dutch_Flemish\n$valueAlpha3Terminology = $valueAlpha2-\u003etoLanguageAlpha3Terminology();     // LanguageAlpha3Terminology::Dutch_Flemish\n$valueAlpha3Terminology-\u003egetNameInLanguage(LanguageAlpha2::Dutch_Flemish); // 'Nederlands'\n$valueAlpha3Terminology-\u003egetNameInLanguage(LanguageAlpha2::English);       // 'Dutch'\n```\n\n### LanguageAlpha3Bibliographic (ISO 639-2)\n\n```php\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha2;\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha3Bibliographic;\n\n$valueAlpha3 = LanguageAlpha3Bibliographic::from('dut');               // LanguageAlpha3Bibliographic::Dutch_Flemish\n$value = $valueAlpha3-\u003evalue;                                          // 'dut'\n$valueName = $valueAlpha3-\u003ename;                                       // 'Dutch_Flemish'\n$valueAlpha2 = $valueAlpha3-\u003etoLanguageAlpha2();                       // LanguageAlpha2::Dutch_Flemish\n$valueAlpha3Terminology = $valueAlpha3-\u003etoLanguageAlpha3Terminology(); // LanguageAlpha3Terminology::Dutch_Flemish\n$valueAlpha3Bibliographic-\u003egetNameInLanguage(LanguageAlpha2::Dutch_Flemish); // 'Nederlands'\n$valueAlpha3Bibliographic-\u003egetNameInLanguage(LanguageAlpha2::English);       // 'Dutch'\n```\n\n### LanguageAlpha3Terminology (ISO 639-2)\n\n```php\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha2;\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha3Terminology;\n\n$valueAlpha3 = LanguageAlpha3Terminology::from('nld');                     // LanguageAlpha3Terminology::Dutch_Flemish\n$value = $valueAlpha3-\u003evalue;                                              // 'nld'\n$valueName = $valueAlpha3-\u003ename;                                           // 'Dutch_Flemish'\n$valueAlpha2 = $valueAlpha3-\u003etoLanguageAlpha2();                           // LanguageAlpha2::Dutch_Flemish\n$valueAlpha3Bibliographic = $valueAlpha3-\u003etoLanguageAlpha3Bibliographic(); // LanguageAlpha3Bibliographic::Dutch_Flemish\n$valueAlpha3Terminology-\u003egetNameInLanguage(LanguageAlpha2::Dutch_Flemish); // 'Nederlands'\n$valueAlpha3Terminology-\u003egetNameInLanguage(LanguageAlpha2::English);       // 'Dutch'\n```\n\n### LanguageAlpha3Extensive (ISO 639-3)\n\n```php\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha3Extensive;\n\n$valueAlpha3 = LanguageAlpha3Extensive::from('nld'); // LanguageAlpha3Extensive::Dutch\n$value = $valueAlpha3-\u003evalue;                        // 'nld'\n$valueName = $valueAlpha3-\u003ename;                     // 'Dutch'\n```\n\n\u003c/details\u003e\n\n## Language Tags (RFC 5646)\n\n\u003e :mortar-board: **Language tags always have a primary tag, and can have an extension, script, region, one or more variants, one or more extension and/or a private subtag.**\n\n### At a glance\n\n```php\nuse PrinsFrank\\Standards\\Country\\CountryAlpha2;\nuse PrinsFrank\\Standards\\Language\\LanguageTag;\nuse PrinsFrank\\Standards\\Language\\LanguageAlpha2;\nuse PrinsFrank\\Standards\\LanguageTag\\LanguageTagVariant;\n\nLanguageTag::tryFromString('');            // null\nLanguageTag::fromString();                 // InvalidArgumentException\nLanguageTag::fromString('nl');             // LanguageTag(LanguageAlpha2::Dutch_Flemish);\nLanguageTag::fromString('i-enochian');     // LanguageTag(SingleCharacterSubtag::GRANDFATHERED, privateUseSubtag: 'enochian')\nLanguageTag::fromString('zh-Hant');        // LanguageTag(LanguageAlpha2::Chinese, script: ScriptSubtag::Han_Traditional_variant)\nLanguageTag::fromString('sr-Cyrl');        // LanguageTag(LanguageAlpha2::Serbian, scriptSubtag: ScriptCode::Cyrillic)\nLanguageTag::fromString('zh-cmn-Hans-CN'); // LanguageTag(LanguageAlpha2::Chinese, LanguageAlpha3Extensive::Mandarin_Chinese, ScriptCode::Han_Simplified_variant, CountryAlpha2::China)\nLanguageTag::fromString('sl-rozaj-biske'); // LanguageTag(LanguageAlpha2::Slovenian, variantSubtag: [LanguageTagVariant::Rezijan, LanguageTagVariant::The_Bila_dialect_of_Resian])\nLanguageTag::fromString('de-CH-1901');     // LanguageTag(LanguageAlpha2::German, regionSubtag: CountryAlpha2::Switzerland, variantSubtag: [LanguageTagVariant::Traditional_German_orthography])\n\nLanguageTag::fromString('de-CH-1901')-\u003eprimaryLanguageSubtag; // LanguageAlpha2::German\nLanguageTag::fromString('de-CH-1901')-\u003eregionSubtag;          // CountryAlpha2::Switzerland\n\nLanguageAlpha2::Dutch_Flemish-\u003etoLanguageTag(); // 'nl'\nLanguageAlpha2::German-\u003etoLanguageTag(regionSubtag: CountryAlpha2::Switzerland, variantSubtag: [LanguageTagVariant::Traditional_German_orthography]); // 'de-CH-1901'\n\npublic function foo(LanguageTag $languageTag): {} // Use spec as typehint to enforce valid value\n```\n\n## Geographic regions (M49)\n\n\u003e :mortar_board: **Geographic regions are represented by three digits. Leading zeros are required. Each geographic region can span multiple other geographic regions or countries.**\n\n### At a glance\n\n```php\nuse PrinsFrank\\Standards\\Region\\GeographicRegion;\n\nGeographicRegion::from('150');        // GeographicRegion::Europe\nGeographicRegion::from('150')-\u003evalue; // '150'\nGeographicRegion::from('150')-\u003ename;  // Europe\nGeographicRegion::Europe;             // GeographicRegion::Europe\n\nGeographicRegion::from('150')-\u003egetDirectSubRegions();   // [GeographicRegion::Eastern_Europe, GeographicRegion::Northern_Europe, ...]\nGeographicRegion::from('150')-\u003egetAllSubRegions();      // [GeographicRegion::Eastern_Europe, GeographicRegion::Northern_Europe, ...]\n\nGeographicRegion::from('150')-\u003egetDirectSubCountries(); // []\nGeographicRegion::from('150')-\u003egetAllSubCountries();    // [CountryNumeric::Belarus, CountryNumeric::Bulgaria, ...]\n\npublic function foo(GeographicRegion $geographicRegion) {} // Use spec as typehint to enforce valid value\n```\n\n## National Call Prefixes (ITU-T E.164)\n\nDifferent countries have different national call prefixes;\n\n### At a glance\n\n```php\nuse PrinsFrank\\Standards\\NationalCallPrefix\\NationalCallPrefix;\nuse PrinsFrank\\Standards\\Country\\CountryAlpha2;\nuse PrinsFrank\\Standards\\Country\\CountryAlpha3;\nuse PrinsFrank\\Standards\\Country\\CountryNumeric;\nuse PrinsFrank\\Standards\\Country\\CountryName;\n\nNationalCallPrefix::from('0');                // NationalCallPrefix::_0\nNationalCallPrefix::from('0')-\u003evalue;         // '0'\nNationalCallPrefix::from('0')-\u003ename;          // '_0'\nNationalCallPrefix::_0;                       // NationalCallPrefix::_0\n\nNationalCallPrefix::forCountry(CountryAlpha2::Netherlands);  // NationalCallPrefix::_0\nNationalCallPrefix::forCountry(CountryAlpha3::Netherlands);  // NationalCallPrefix::_0\nNationalCallPrefix::forCountry(CountryNumeric::Netherlands); // NationalCallPrefix::_0\nNationalCallPrefix::forCountry(CountryName::Netherlands);    // NationalCallPrefix::_0\n\npublic function foo(NationalCallPrefix $nationalCallPrefix) {} // Use spec as typehint to enforce valid value\n```\n\n## Scripts\n\n[![Daily Script spec update](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-scripts.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-scripts.yml)\n\n### At a glance\n\n```php\nuse PrinsFrank\\Standards\\Scripts\\ScriptAlias;\nuse PrinsFrank\\Standards\\Scripts\\ScriptCode;\nuse PrinsFrank\\Standards\\Scripts\\ScriptName;\nuse PrinsFrank\\Standards\\Scripts\\ScriptNumber;\n\nScriptAlias::from('Latin');                    // ScriptAlias::Latin\nScriptAlias::from('Latin')-\u003evalue;             // 'Latin'\nScriptAlias::from('Latin')-\u003ename;              // 'Latin'\nScriptAlias::Latin;                            // ScriptAlias::Latin\nScriptAlias::from('Latin')-\u003etoScriptCode();    // ScriptCode::Latin\nScriptCode::from('Latn');                      // ScriptCode::Latin\nScriptName::from('Latin');                     // ScriptName::Latin\nScriptNumber::from('215');                     // ScriptNumber::Latin\n\nScriptAlias::Latin-\u003eisSupportedByPHPRegex();   // true\nScriptAlias::allForString('еюeuеюευ');         // [ScriptAlias::Cyrillic, ScriptAlias::Greek, ScriptAlias::Latin]\nScriptAlias::hasMultipleForString('еюeuеюευ'); // true\nScriptAlias::mostCommonInString('еюeuеюευ');   // ScriptAlias::Cyrillic\n\npublic function foo(ScriptAlias $scriptAlias) {} // Use spec as typehint to enforce valid value\n```\n\n\u003cdetails\u003e\n    \u003csummary\u003eFull documentation\u003c/summary\u003e\n\n### ScriptAlias\n\n```php\nuse PrinsFrank\\Standards\\Scripts\\ScriptAlias;\n\nScriptAlias::from('Latin');                          // ScriptAlias::latin\nScriptAlias::from('Latin')-\u003evalue;                   // 'Latin'\nScriptAlias::from('Latin')-\u003ename;                    // 'Latin'\nScriptAlias::from('Latin')-\u003etoScriptCode();          // ScriptCode::Latin\nScriptAlias::from('Latin')-\u003etoScriptName();          // ScriptName::Latin\nScriptAlias::from('Latin')-\u003etoScriptNumber();        // ScriptNumber::Latin\nScriptAlias::Latin;                                  // ScriptAlias::Latin\nScriptAlias::from('Latin')-\u003eisSupportedByPHPRegex(); // true\n\nScriptAlias::allForString('еюeuеюευ');               // [ScriptAlias::Cyrillic, ScriptAlias::Greek, ScriptAlias::Latin]\nScriptAlias::hasMultipleForString('еюeuеюευ');       // true\nScriptAlias::mostCommonInString('еюeuеюευ');         // ScriptAlias::Cyrillic\n\npublic function foo(ScriptAlias $scriptAlias) {} // Use spec as typehint to enforce valid value\n```\n\nPHP has regex support for detecting scripts using the following notation:\n\nMatch any Arabic character\n```regexp\n\\p{Arabic}\n```\n\nMatch any NON-Arabic character\n```regexp\n\\P{Arabic}\n```\n\nNot all scripts are supported by PHP regular expressions. An exhaustive list can be found in the [PHP documentation for Unicode character properties](https://www.php.net/manual/en/regexp.reference.unicode.php). For convenience, the information on that page is parsed daily and supplied in this package using the `isSupportedByPHPRegex` method and `SupportedByPHPRegex` attribute which is the underlying information used by the `isSupportedByPHPRegex` method.\n\n### ScriptCode\n\n```php\nuse PrinsFrank\\Standards\\Scripts\\ScriptCode;\n\nScriptCode::from('Latn');                     // ScriptCode::latin\nScriptCode::from('Latn')-\u003evalue;              // 'Latin'\nScriptCode::from('Latn')-\u003ename;               // 'Latin'\nScriptCode::from('Latn')-\u003etoScriptAlias();    // ScriptAlias::Latin\nScriptCode::from('Latn')-\u003etoScriptName();     // ScriptName::Latin\nScriptCode::from('Latn')-\u003etoScriptNumber();   // ScriptNumber::Latin\nScriptCode::Latin;                            // ScriptCode::Latin\n\nScriptCode::allForString('еюeuеюευ');         // [ScriptCode::Cyrillic, ScriptCode::Greek, ScriptCode::Latin]\nScriptCode::hasMultipleForString('еюeuеюευ'); // true\nScriptCode::mostCommonInString('еюeuеюευ');   // ScriptCode::Cyrillic\n\npublic function foo(ScriptCode $scriptCode) {} // Use spec as typehint to enforce valid value\n```\n\n### ScriptName\n\n```php\nuse PrinsFrank\\Standards\\Scripts\\ScriptName;\n\nScriptName::from('Latin');                    // ScriptName::latin\nScriptName::from('Latin')-\u003evalue;             // 'Latin'\nScriptName::from('Latin')-\u003ename;              // 'Latin'\nScriptName::from('Latin')-\u003etoScriptCode();    // ScriptCode::Latin\nScriptName::from('Latin')-\u003etoScriptAlias();   // ScriptAlias::Latin\nScriptName::from('Latin')-\u003etoScriptNumber();  // ScriptNumber::Latin\nScriptName::Latin;                            // ScriptName::Latin\n\nScriptName::allForString('еюeuеюευ');         // [ScriptName::Cyrillic, ScriptName::Greek, ScriptName::Latin]\nScriptName::hasMultipleForString('еюeuеюευ'); // true\nScriptName::mostCommonInString('еюeuеюευ');   // ScriptName::Cyrillic\n\npublic function foo(ScriptName $scriptName) {} // Use spec as typehint to enforce valid value\n```\n\n### ScriptNumber\n\n```php\nuse PrinsFrank\\Standards\\Scripts\\ScriptNumber;\n\nScriptNumber::from('215');                      // ScriptNumber::latin\nScriptNumber::from('215')-\u003evalue;               // 'Latin'\nScriptNumber::from('215')-\u003ename;                // 'Latin'\nScriptNumber::from('215')-\u003etoScriptCode();      // ScriptCode::Latin\nScriptNumber::from('215')-\u003etoScriptName();      // ScriptName::Latin\nScriptNumber::from('215')-\u003etoScriptAlias();     // ScriptAlias::Latin\nScriptNumber::Latin;                            // ScriptNumber::Latin\n\nScriptNumber::allForString('еюeuеюευ');         // [ScriptNumber::Cyrillic, ScriptAlias::Greek, ScriptAlias::Latin]\nScriptNumber::hasMultipleForString('еюeuеюευ'); // true\nScriptNumber::mostCommonInString('еюeuеюευ');   // ScriptNumber::Cyrillic\n\npublic function foo(ScriptNumber $scriptNumber) {} // Use spec as typehint to enforce valid value\n```\n\n\u003c/details\u003e\n\n## TLDs\n\n[![Daily TLD spec update](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-tld.yml/badge.svg)](https://github.com/PrinsFrank/standards/actions/workflows/update-spec-tld.yml)\n\nThere are currently 6 types of Top Level Domains:\n- CountryCode\n- GenericRestricted\n- Generic\n- Infrastructure\n- Sponsored\n- Test\n\nMost of these specification have several TLDs that are 'unmanaged' and are thus not currently available. Those are marked as deprecated, but are kept in the specification. There is one exception: All Test TLDs are always unmanaged and are thus never marked as deprecated.\n\n### CountryCodeTLD\n\nWhere a TLD is marked as unmanaged by IANA it is marked as deprecated.\n\n```php\nuse PrinsFrank\\Standards\\TopLevelDomain\\CountryCodeTLD;\n\nCountryCodeTLD::from('nl');                      // CountryCodeTLD::nl\nCountryCodeTLD::nl;                              // CountryCodeTLD::nl\nCountryCodeTLD::from('nl')-\u003evalue;               // 'nl'\nCountryCodeTLD::from('nl')-\u003ename;                // 'nl'\nCountryCodeTLD::from('nl')-\u003eisAssigned();        // true\nCountryCodeTLD::from('nl')-\u003egetCountryAlpha2();  // CountryAlpha2::Netherlands\nCountryCodeTLD::from('nl')-\u003egetCountryAlpha3();  // CountryAlpha3::Netherlands\nCountryCodeTLD::from('nl')-\u003egetCountryNumeric(); // CountryNumeric::Netherlands\n\npublic function foo(CountryCodeTLD $countryCodeTLD) {} // Use spec as typehint to enforce valid value\n```\n\n### GenericRestrictedTLD\n\nWhere a TLD is marked as unmanaged by IANA it is marked as deprecated.\n\n```php\nuse PrinsFrank\\Standards\\TopLevelDomain\\GenericRestrictedTLD;\n\nGenericRestrictedTLD::from('name');                // GenericRestrictedTLD::name\nGenericRestrictedTLD::name;                        // GenericRestrictedTLD::name\nGenericRestrictedTLD::from('name')-\u003evalue;         // 'name'\nGenericRestrictedTLD::from('name')-\u003ename;          // 'name'\nGenericRestrictedTLD::from('name')-\u003eisAssigned();  // true\n\npublic function foo(GenericRestrictedTLD $genericRestrictedTLD) {} // Use spec as typehint to enforce valid value\n```\n\n### GenericTLD\n\nWhere a TLD is marked as unmanaged by IANA it is marked as deprecated.\n\n```php\nuse PrinsFrank\\Standards\\TopLevelDomain\\GenericTLD;\n\nGenericTLD::from('aaa');                // GenericTLD::aaa\nGenericTLD::aaa;                        // GenericTLD::aaa\nGenericTLD::from('aaa')-\u003evalue;         // 'aaa'\nGenericTLD::from('aaa')-\u003ename;          // 'aaa'\nGenericTLD::from('aaa')-\u003eisAssigned();  // true\n\npublic function foo(GenericTLD $genericTLD) {} // Use spec as typehint to enforce valid value\n```\n\n### InfrastructureTLD\n\nWhere a TLD is marked as unmanaged by IANA it is marked as deprecated.\n\n```php\nuse PrinsFrank\\Standards\\TopLevelDomain\\InfrastructureTLD;\n\nInfrastructureTLD::from('arpa');                // InfrastructureTLD::arpa\nInfrastructureTLD::arpa;                        // InfrastructureTLD::arpa\nInfrastructureTLD::from('arpa')-\u003evalue;         // 'arpa'\nInfrastructureTLD::from('arpa')-\u003ename;          // 'arpa'\nInfrastructureTLD::from('arpa')-\u003eisAssigned();  // true\n\npublic function foo(InfrastructureTLD $infrastructureTLD) {} // Use spec as typehint to enforce valid value\n```\n\n### SponsoredTLD\n\nWhere a TLD is marked as unmanaged by IANA it is marked as deprecated.\n\n```php\nuse PrinsFrank\\Standards\\TopLevelDomain\\SponsoredTLD;\n\nSponsoredTLD::from('aero');                // SponsoredTLD::aero\nSponsoredTLD::arpa;                        // SponsoredTLD::aero\nSponsoredTLD::from('aero')-\u003evalue;         // 'aero'\nSponsoredTLD::from('aero')-\u003ename;          // 'aero'\nSponsoredTLD::from('aero')-\u003eisAssigned();  // true\n\npublic function foo(SponsoredTLD $sponsoredTLD) {} // Use spec as typehint to enforce valid value\n```\n\n### TestTLD\n\nAll Test TLDs are always unmanaged and are thus never marked as deprecated.\n\n```php\nuse PrinsFrank\\Standards\\TopLevelDomain\\TestTLD;\n\nTestTLD::from('テスト');              // TestTLD::tesuto_katakana\nTestTLD::tesuto_katakana;            // TestTLD::tesuto_katakana\nTestTLD::from('テスト')-\u003evalue;       // 'テスト'\nTestTLD::from('テスト')-\u003ename;        // 'tesuto_katakana'\nTestTLD::from('テスト')-\u003eisAssigned() // false\n\npublic function foo(TestTLD $testTLD) {} // Use spec as typehint to enforce valid value\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPrinsFrank%2Fstandards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPrinsFrank%2Fstandards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPrinsFrank%2Fstandards/lists"}