LeKoala\GeoTools\CountriesData
- Author: Koala
Synopsis
class CountriesData
{
- // constants
- const SHORT_NAME = 'ShortName';
- const OFFICIAL_NAME = 'OfficialName';
- const ISO3 = 'ISO3';
- const ISO2 = 'ISO2';
- const UNI = 'UNI';
- const UNDP = 'UNDP';
- const FAOSTAT = 'FAOSTAT';
- const GAUL = 'GAUL';
- // methods
- public void __construct()
- public static $this getInstance()
- public string getFile()
- public void setFile()
- private void loadData()
- public array getCountries()
- public string convertCode()
- public string convertIso2ToIso3()
- public string convertIso3ToIso2()
- public array toMap()
- public static array getCountryList()
Constants
Name | Value |
---|---|
SHORT_NAME | 'ShortName' |
OFFICIAL_NAME | 'OfficialName' |
ISO3 | 'ISO3' |
ISO2 | 'ISO2' |
UNI | 'UNI' |
UNDP | 'UNDP' |
FAOSTAT | 'FAOSTAT' |
GAUL | 'GAUL' |
Members
private
- $data — array
- $file — string
Methods
private
public
- __construct()
- convertCode() — Convert a code to another
- convertIso2ToIso3() — Convert ISO2 to ISO3
- convertIso3ToIso2() — Convert ISO2 to ISO3
- getCountries() — Get the list of all countries
- getCountryList() — Get the country list, using IntlLocales
- getFile()
- getInstance()
- setFile()
- toMap() — Get a map of countries as key => value