Свойство | Тип | Описание | |
---|---|---|---|
$dataCache | array | Cached data. | |
$dataDir | string | Path to the directory containing countries data. | |
$dataSources | array | Available data sources. |
Метод | Описание | |
---|---|---|
__construct ( string | null $dataDir = null ) | Constructor. | |
getDataDir ( ) : string | ||
getList ( string $locale = 'en', string $format = 'php', string $source = 'cldr' ) : array | Returns a list of countries. | |
getOne ( string $countryCode, string $locale = 'en', string $source = 'cldr' ) : string | Returns one country. | |
has ( string $countryCode, string $locale = 'en', string $source = 'cldr' ) : boolean | Indicates whether or not a given $countryCode matches a country. | |
setList ( string $locale, string $source, array $data ) : |
Метод | Описание | |
---|---|---|
loadData ( string $locale, string $source, string $format ) : array | A lazy-loader that loads data from a PHP file if it is not stored in memory yet. | |
sortData ( string $locale, array $data ) : array | Sorts the data array for a given locale, using the locale translations. |
public __construct ( string | null $dataDir = null ) | ||
$dataDir | string | null | Path to the directory containing countries data |
public getDataDir ( ) : string | ||
Результат | string | The country data directory. |
protected string $dataDir | ||
Результат | string |
protected array $dataSources | ||
Результат | array |