Download the PHP package datablock/countrycodes without Composer
On this page you can find all versions of the php package datablock/countrycodes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package countrycodes
DataBlock : Country Codes
Install
Usage
New instance
Parameters :
$country
string to define a specific country.
Example :
Set the country
Define or orverride the country definition :
Parameters :
$country
string (required) to define a specific country.
Database
Getting database as PHP array :
- If the
$country
is not defined,getDatabase
return the full database. -
If the
$country
is defined,getDatabase
return the database for the country. getDatabase
return data as PHP array.getJsonDatabase
return data as JSON file.
Parameters :
$country
string to define a specific country.
Examples :
-
Example 1 (Full database) :
-
Example 2 (Database for a specific country on instance) :
-
Example 3 (Database for a specific country after instance) :
- Example 4 (Database for a specific country only for the method) :
Get Country Name
- If the
$country
is not defined,getCountryName
return the associative array of['country_code'] => "Country name"
. - If the
$country
is defined,getCountryName
return the name of the country.
Parameters & Examples : same as getDatabase
Get the code ISO Alpha 2
- If the
$country
is not defined,getIso2
return the associative array of['country_code'] => "Country ISO 2"
. - If the
$country
is defined,getIso2
return the code iso alpha 2 of the country.
Parameters & Examples : same as getDatabase
Get the code ISO Alpha 3
- If the
$country
is not defined,getIso3
return the associative array of['country_code'] => "Country ISO 3"
. - If the
$country
is defined,getIso3
return the code iso alpha 3 of the country.
Parameters & Examples : same as getDatabase
Get the TLD
- If the
$country
is not defined,getTld
return the associative array of['country_code'] => "Country TLD"
. - If the
$country
is defined,getTld
return the TLD of the country.
Parameters & Examples : same as getDatabase
Get the code FIPS
- If the
$country
is not defined,getFips
return the associative array of['country_code'] => "Country FIPS"
. - If the
$country
is defined,getFips
return the code FIPS of the country.
Parameters & Examples : same as getDatabase
Get the code ISO Numeric
- If the
$country
is not defined,getIsoNumeric
return the associative array of['country_code'] => "Country ISO Numeric"
. - If the
$country
is defined,getIsoNumeric
return the code iso numeric of the country.
Parameters & Examples : same as getDatabase
Get the geoname ID
- If the
$country
is not defined,getGeonameId
return the associative array of['country_code'] => "Country Geoname ID"
. - If the
$country
is defined,getGeonameId
return the geoname ID of the country.
Parameters & Examples : same as getDatabase
Get the E164
- If the
$country
is not defined,getE164
return the associative array of['country_code'] => "Country E164"
. - If the
$country
is defined,getE164
return the E164 of the country.
Parameters & Examples : same as getDatabase
Get the PhoneCode
- If the
$country
is not defined,getPhoneCode
return the associative array of['country_code'] => "Country PhoneCode"
. - If the
$country
is defined,getPhoneCode
return the PhoneCode of the country.
Parameters & Examples : same as getDatabase
Get the Continent
- If the
$country
is not defined,getContinent
return the associative array of['country_code'] => "Country Continent"
. - If the
$country
is defined,getContinent
return the Continent of the country.
Parameters & Examples : same as getDatabase
Get the Capital
- If the
$country
is not defined,getCapital
return the associative array of['country_code'] => "Country Capital"
. - If the
$country
is defined,getCapital
return the Capital of the country.
Parameters & Examples : same as getDatabase
Get the Timezone
- If the
$country
is not defined,getTimezone
return the associative array of['country_code'] => "Country Timezone"
. - If the
$country
is defined,getTimezone
return the Timezone of the country.
Parameters & Examples : same as getDatabase
Get the Currency
- If the
$country
is not defined,getCurrency
return the associative array of['country_code'] => "Country Currency"
. - If the
$country
is defined,getCurrency
return the Currency of the country.
Parameters & Examples : same as getDatabase
Get the LanguageCodes
- If the
$country
is not defined,getLanguageCodes
return the associative array of['country_code'] => "Country LanguageCodes"
. - If the
$country
is defined,getCurrency
return the LanguageCodes of the country.
Parameters & Examples : same as getDatabase
Get the Languages
- If the
$country
is not defined,getLanguages
return the associative array of['country_code'] => "Country Languages"
. - If the
$country
is defined,getLanguages
return the Languages of the country.
Parameters & Examples : same as getDatabase
Get the Area
- If the
$country
is not defined,getArea
return the associative array of['country_code'] => "Country Area"
. - If the
$country
is defined,getArea
return the Area of the country.
Parameters & Examples : same as getDatabase