deft/iso3166-utility
Composer 安装命令:
composer require deft/iso3166-utility
包简介
Library to convert ISO3166 alpha-2 country codes to their alpha-3 counterpart and vice versa.
README 文档
README
Library to convert ISO3166 alpha-2 country codes to their alpha-3 counterpart and vice versa.
Usage
<?php $util = new Deft\ISO3166\CountryCodeUtility(); print $util->convertAlpha2ToAlpha3('NL'); // Outputs 'NLD' print $util->convertAlpha3ToAlpha2('NLD'); // Outputs 'NL'; // Converting non-existing country codes will result in null $util->convertAlpha3ToAlpha2('FOO'); // Returns null // You can provide a custom country code list by passing the path as the first // constructor argument. The file should be tab separated ("NL\tNLD\n") $utilCustom = new Deft\ISO3166\CountryCodeUtility('custom_country_code_list.txt');
统计信息
- 总下载量: 16k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-06-21