iso3166

A PHP library providing ISO 3166-1 data.

  • 所有者: alcohol/iso3166
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

league/iso3166

A PHP library providing ISO 3166-1 data.

Build Status
Code Coverage
License

What is ISO 3166-1

ISO 3166-1 is part of the ISO 3166 standard published by the International Organization for Standardization (ISO), and defines codes for the names of countries, dependent territories, and special areas of geographical interest. The official name of the standard is Codes for the representation of names of countries and their subdivisions – Part 1: Country codes. It defines three sets of country codes:

  • ISO 3166-1 alpha-2 – two-letter country codes which are the most widely used of the three, and used most prominently for the Internet's country code top-level domains (with a few exceptions).
  • ISO 3166-1 alpha-3 – three-letter country codes which allow a better visual association between the codes and the country names than the alpha-2 codes.
  • ISO 3166-1 numeric – three-digit country codes which are identical to those developed and maintained by the United Nations Statistics Division, with the advantage of script (writing system) independence, and hence useful for people or systems using non-Latin scripts.

-- Wikipedia

Installing

$ composer require league/iso3166

Using

See using section of the documentation.

Quick guide:

$data = (new League\ISO3166\ISO3166)->name($name);
$data = (new League\ISO3166\ISO3166)->alpha2($alpha2);
$data = (new League\ISO3166\ISO3166)->alpha3($alpha3);
$data = (new League\ISO3166\ISO3166)->numeric($numeric);

Data sample:

[
    'name' => 'Netherlands',
    'alpha2' => 'NL',
    'alpha3' => 'NLD',
    'numeric' => '528',
    'currency' => [
        'EUR',
    ]
]

Contributing

Feel free to submit a pull request or create an issue.

License

league/iso3166 is licensed under the MIT license.

Source(s)

主要指标

概览
名称与所有者alcohol/iso3166
主编程语言PHP
编程语言PHP (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2016-06-30 09:48:51
推送于2024-10-11 11:22:04
最后一次提交
发布数18
最新版本名称4.3.2 (发布于 2024-10-10 09:40:15)
第一版名称1.0.0 (发布于 )
用户参与
星数672
关注者数13
派生数62
提交数154
已启用问题?
问题数52
打开的问题数10
拉请求数37
打开的拉请求数5
关闭的拉请求数21
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?