Documentation

Country
in package

Country class.

Table of Contents

findCountryName()  : string
Return correct key value of given country in user language.
getAll()  : array<string|int, mixed>
Get all country.
getCountryCode()  : string|null
Get country code by name.
getCountryName()  : string|null
Get country name by code.

Methods

findCountryName()

Return correct key value of given country in user language.

public static findCountryName(string $value) : string
Parameters
$value : string
Return values
string

getAll()

Get all country.

public static getAll([bool|string $type = false ]) : array<string|int, mixed>
Parameters
$type : bool|string = false
Return values
array<string|int, mixed>

getCountryCode()

Get country code by name.

public static getCountryCode(string $countryName) : string|null
Parameters
$countryName : string
Return values
string|null

Return null if not found.

getCountryName()

Get country name by code.

public static getCountryName(string $countryCode) : string|null
Parameters
$countryCode : string
Return values
string|null

Return null if not found.


        

Search results