Country
in package
uses
TraitCache, TraitData
FinalYes
Table of Contents
Properties
- $countryName : string
- $cache : Cache
- $cfgVar : array<string|int, mixed>
Methods
- __construct() : mixed
- fetchCountryData() : array<string|int, mixed>
- Usefull in loops
- getCacheInstance() : Cache
- getCountryByIso() : string
- get english country name by iso alpha2
- getDataInstance() : Data
- getFlag() : string
- getIso() : string
- get iso2 by country name
- getOptionsCountry() : string
- Returns selectbox options of countries, country name by user language de/en
- getSelBoxCountries() : string
- Selectbox für Parties und Member unter Select2
- getTranslate() : string
- translate english country name to target language
- fetchCountryIso() : string
- Iso2 by country name, lowercases it
- getCountriesByContinentAndLanguage() : array<string|int, mixed>
Properties
$countryName
public
string
$countryName
= ''
$cache
private
Cache
$cache
$cfgVar
private
array<string|int, mixed>
$cfgVar
Methods
__construct()
public
__construct() : mixed
fetchCountryData()
Usefull in loops
public
fetchCountryData(string $country) : array<string|int, mixed>
Parameters
- $country : string
Return values
array<string|int, mixed>getCacheInstance()
public
getCacheInstance() : Cache
Return values
CachegetCountryByIso()
get english country name by iso alpha2
public
getCountryByIso([string $strIso = '' ]) : string
Parameters
- $strIso : string = ''
Return values
string —- english country name
getDataInstance()
public
getDataInstance() : Data
Return values
DatagetFlag()
public
getFlag([int $bLink = 1 ]) : string
Parameters
- $bLink : int = 1
Return values
stringgetIso()
get iso2 by country name
public
getIso([string|null $countryName = '' ]) : string
Parameters
- $countryName : string|null = ''
Return values
string —- translated to german
getOptionsCountry()
Returns selectbox options of countries, country name by user language de/en
public
getOptionsCountry([array<string|int, mixed>|string $strSelected = '' ]) : string
Parameters
- $strSelected : array<string|int, mixed>|string = ''
-
- the pre selected value
Return values
string —- the options for the selectbox
getSelBoxCountries()
Selectbox für Parties und Member unter Select2
public
getSelBoxCountries(string $loccountry[, string|null $type = 'party' ]) : string
Parameters
- $loccountry : string
- $type : string|null = 'party'
Return values
stringgetTranslate()
translate english country name to target language
public
getTranslate([string|null $countryName = '' ]) : string
Parameters
- $countryName : string|null = ''
Return values
string —- translated to german
fetchCountryIso()
Iso2 by country name, lowercases it
private
fetchCountryIso() : string
Return values
stringgetCountriesByContinentAndLanguage()
private
getCountriesByContinentAndLanguage(string $key, int $nLangID) : array<string|int, mixed>
Parameters
- $key : string
- $nLangID : int