Docs Goabase

Country
in package
uses TraitLanguage

Table of Contents

Properties

$countryName  : string

Methods

__construct()  : mixed
fetchCountryData()  : array<string|int, mixed>
Usefull in loops
getCountryByIso()  : string
get english country name by iso alpha2
getFlag()  : string
getIso()  : string
get iso2 by country name
getLanguageInstance()  : Language
getTranslate()  : string
translate english country name to target language
setCountry()  : void
getIsoAndTitle()  : array<string|int, mixed>

Properties

$countryName

private string $countryName = ''

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

getTranslate()

translate english country name to target language

public getTranslate([string|null $countryName = '' ]) : string
Parameters
$countryName : string|null = ''
Return values
string
  • translated to german

setCountry()

public setCountry(string $countryName) : void
Parameters
$countryName : string

getIsoAndTitle()

private getIsoAndTitle() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results