‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Country\CountryProvider Class Reference

Public Member Functions

 __construct ()
 
Country[] getAll ()
 
 getByIsoCode (string $isoCode)
 
 getByAlpha2IsoCode (string $isoCode)
 
 getByAlpha3IsoCode (string $isoCode)
 
 getByEnglishName (string $name)
 

Public Attributes

array< string, function getFiltered(CountryFilter $filter):array { if(empty( $filter->getOnlyCountries()) &&empty( $filter->getExcludeCountries())) { return $this-> countries
 
if(!empty($filter->getExcludeCountries())) else
 
if(empty($filter->getOnlyCountries())) $countries = []
 
foreach($filter->getOnlyCountries() as $countryCode) return $countries
 

Private Attributes

array $rawData
 
array $countries = []
 

Detailed Description

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)

Definition at line 25 of file CountryProvider.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Country\CountryProvider::__construct ( )

Member Function Documentation

◆ getAll()

Country [] TYPO3\CMS\Core\Country\CountryProvider::getAll ( )
Returns
Country[]

Definition at line 1731 of file CountryProvider.php.

References TYPO3\CMS\Core\Country\CountryProvider\$countries.

◆ getByAlpha2IsoCode()

TYPO3\CMS\Core\Country\CountryProvider::getByAlpha2IsoCode ( string  $isoCode)

◆ getByAlpha3IsoCode()

TYPO3\CMS\Core\Country\CountryProvider::getByAlpha3IsoCode ( string  $isoCode)

◆ getByEnglishName()

TYPO3\CMS\Core\Country\CountryProvider::getByEnglishName ( string  $name)

◆ getByIsoCode()

TYPO3\CMS\Core\Country\CountryProvider::getByIsoCode ( string  $isoCode)

Member Data Documentation

◆ $countries [1/3]

array TYPO3\CMS\Core\Country\CountryProvider::$countries = []
private

Definition at line 1712 of file CountryProvider.php.

Referenced by TYPO3\CMS\Core\Country\CountryProvider\getAll().

◆ $countries [2/3]

if (empty( $filter->getOnlyCountries())) TYPO3\CMS\Core\Country\CountryProvider::$countries = []

Definition at line 1801 of file CountryProvider.php.

◆ $countries [3/3]

foreach ( $filter->getOnlyCountries() as $countryCode) return TYPO3\CMS\Core\Country\CountryProvider::$countries

Definition at line 1809 of file CountryProvider.php.

◆ $rawData

array TYPO3\CMS\Core\Country\CountryProvider::$rawData
private

Definition at line 28 of file CountryProvider.php.

◆ countries

array<string, function getFiltered(CountryFilter $filter): array { if (empty($filter->getOnlyCountries()) && empty($filter->getExcludeCountries())) { return $this-> TYPO3\CMS\Core\Country\CountryProvider::countries

◆ else

if (!empty( $filter->getExcludeCountries())) TYPO3\CMS\Core\Country\CountryProvider::else
Initial value:
{
$possibleCountries = $this->‪countries

Definition at line 1793 of file CountryProvider.php.

‪TYPO3\CMS\Core\Country\CountryProvider\countries
‪array< string, function getFiltered(CountryFilter $filter):array { if(empty( $filter->getOnlyCountries()) &&empty( $filter->getExcludeCountries())) { return $this-> countries
Definition: CountryProvider.php:1782