承接 mibo/countries 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mibo/countries

最新稳定版本:2.0.0

Composer 安装命令:

composer require mibo/countries

包简介

PHP Library for ISO 3166-1 country codes

README 文档

README

codecov

mibo/countries

The library provides a simple interface for a country entity and country provider, which retrieves a country by its ISO 3166-1 alpha-2 code, alpha-3 code, or numeric code. The provider is able to retrieve a country by its name, too.
If the provider does not find the country, it returns a null.

The Country entity contains its name, ISO 3166-1 alpha-2 code, alpha-3 code, numeric code, and the country's currencies (objects).

The list of the available countries can be changed by the provider, because the library (ISO) provider uses a provider from 'league/iso3166' library, which provides the same data but as array instead.

$provider = new \MiBo\Countries\ISO\CountryProvider( new \League\ISO3166\ISO3166($myCountryList ?? []), new \MiBo\Currencies\ISO\ISOCurrencyProvider( new \MiBo\Currencies\ISO\ISOArrayListLoader(), new \Psr\Log\NullLogger() ) ) $country = $provider->getByAlpha2('SK'); echo $country->getName(); // Slovakia echo $country->getAlpha2(); // SK echo $country->getAlpha3(); // SVK echo $country->getNumericalCode(); // 703 echo $country->getCurrencies()[0]; // EUR

统计信息

  • 总下载量: 4.8k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固