eugenecooper/world-locations
Composer 安装命令:
composer require eugenecooper/world-locations
包简介
Allows to retrieve all world's countries, cities and regions
README 文档
README
This simple package allows to retrieve all world's countries, a certain country regions and cities, etc. The code is relying on vk.com public API, so if you'll need to make too much requests you should cache results or save them to your database.
Install
Via Composer
$ composer require eugenecooper/world-locations
Usage
$locations = new \EugeneCooper\WorldLocations\Locations; // Obtain an array of all world's countries $locations->getCountries(); // Obtain an array of all country regions ($country_id can be obtained with the method above) $locations->getCountryRegions($country_id); // Obtain an array of all country cities $locations->getCountryCities($country_id); // Obtain an array of all country region's cities ($region_id can be obtained with methods above) $locations->getRegionCities($country_id, $region_id);
License
The MIT License (MIT).
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-13