Docs Goabase

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 = ''

$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>

getCountryByIso()

get english country name by iso alpha2

public getCountryByIso([string $strIso = '' ]) : string
Parameters
$strIso : string = ''
Return values
string
  • english country name

getFlag()

public getFlag([int $bLink = 1 ]) : string
Parameters
$bLink : int = 1
Return values
string

getIso()

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
string

getTranslate()

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
string

getCountriesByContinentAndLanguage()

private getCountriesByContinentAndLanguage(string $key, int $nLangID) : array<string|int, mixed>
Parameters
$key : string
$nLangID : int
Return values
array<string|int, mixed>

        
On this page

Search results