CountryProvider
A class providing information about all countries.
Country data is generated from "Build/Scripts/updateIsoDatabase.php" (which in turn stems from https://github.com/sokil/php-isocodes-db-i18n)
Table of Contents
Methods
- __construct() : mixed
- getAll() : array<string|int, Country>
- getByAlpha2IsoCode() : Country|null
- getByAlpha3IsoCode() : Country|null
- getByEnglishName() : Country|null
- getByIsoCode() : Country|null
- getFiltered() : array<string, Country>
Methods
__construct()
public
__construct() : mixed
getAll()
public
getAll() : array<string|int, Country>
Return values
array<string|int, Country>getByAlpha2IsoCode()
public
getByAlpha2IsoCode(string $isoCode) : Country|null
Parameters
- $isoCode : string
Return values
Country|nullgetByAlpha3IsoCode()
public
getByAlpha3IsoCode(string $isoCode) : Country|null
Parameters
- $isoCode : string
Return values
Country|nullgetByEnglishName()
public
getByEnglishName(string $name) : Country|null
Parameters
- $name : string
Return values
Country|nullgetByIsoCode()
public
getByIsoCode(string $isoCode) : Country|null
Parameters
- $isoCode : string
Return values
Country|nullgetFiltered()
public
getFiltered(CountryFilter $filter) : array<string, Country>
Parameters
- $filter : CountryFilter