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 :
$countrystring to define a specific country.
Example :
Set the country
Define or orverride the country definition :
Parameters :
$countrystring (required) to define a specific country.
Database
Getting database as PHP array :
- If the
$countryis not defined,getDatabasereturn the full database. -
If the
$countryis defined,getDatabasereturn the database for the country. getDatabasereturn data as PHP array.getJsonDatabasereturn data as JSON file.
Parameters :
$countrystring 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
$countryis not defined,getCountryNamereturn the associative array of['country_code'] => "Country name". - If the
$countryis defined,getCountryNamereturn the name of the country.
Parameters & Examples : same as getDatabase
Get the code ISO Alpha 2
- If the
$countryis not defined,getIso2return the associative array of['country_code'] => "Country ISO 2". - If the
$countryis defined,getIso2return the code iso alpha 2 of the country.
Parameters & Examples : same as getDatabase
Get the code ISO Alpha 3
- If the
$countryis not defined,getIso3return the associative array of['country_code'] => "Country ISO 3". - If the
$countryis defined,getIso3return the code iso alpha 3 of the country.
Parameters & Examples : same as getDatabase
Get the TLD
- If the
$countryis not defined,getTldreturn the associative array of['country_code'] => "Country TLD". - If the
$countryis defined,getTldreturn the TLD of the country.
Parameters & Examples : same as getDatabase
Get the code FIPS
- If the
$countryis not defined,getFipsreturn the associative array of['country_code'] => "Country FIPS". - If the
$countryis defined,getFipsreturn the code FIPS of the country.
Parameters & Examples : same as getDatabase
Get the code ISO Numeric
- If the
$countryis not defined,getIsoNumericreturn the associative array of['country_code'] => "Country ISO Numeric". - If the
$countryis defined,getIsoNumericreturn the code iso numeric of the country.
Parameters & Examples : same as getDatabase
Get the geoname ID
- If the
$countryis not defined,getGeonameIdreturn the associative array of['country_code'] => "Country Geoname ID". - If the
$countryis defined,getGeonameIdreturn the geoname ID of the country.
Parameters & Examples : same as getDatabase
Get the E164
- If the
$countryis not defined,getE164return the associative array of['country_code'] => "Country E164". - If the
$countryis defined,getE164return the E164 of the country.
Parameters & Examples : same as getDatabase
Get the PhoneCode
- If the
$countryis not defined,getPhoneCodereturn the associative array of['country_code'] => "Country PhoneCode". - If the
$countryis defined,getPhoneCodereturn the PhoneCode of the country.
Parameters & Examples : same as getDatabase
Get the Continent
- If the
$countryis not defined,getContinentreturn the associative array of['country_code'] => "Country Continent". - If the
$countryis defined,getContinentreturn the Continent of the country.
Parameters & Examples : same as getDatabase
Get the Capital
- If the
$countryis not defined,getCapitalreturn the associative array of['country_code'] => "Country Capital". - If the
$countryis defined,getCapitalreturn the Capital of the country.
Parameters & Examples : same as getDatabase
Get the Timezone
- If the
$countryis not defined,getTimezonereturn the associative array of['country_code'] => "Country Timezone". - If the
$countryis defined,getTimezonereturn the Timezone of the country.
Parameters & Examples : same as getDatabase
Get the Currency
- If the
$countryis not defined,getCurrencyreturn the associative array of['country_code'] => "Country Currency". - If the
$countryis defined,getCurrencyreturn the Currency of the country.
Parameters & Examples : same as getDatabase
Get the LanguageCodes
- If the
$countryis not defined,getLanguageCodesreturn the associative array of['country_code'] => "Country LanguageCodes". - If the
$countryis defined,getCurrencyreturn the LanguageCodes of the country.
Parameters & Examples : same as getDatabase
Get the Languages
- If the
$countryis not defined,getLanguagesreturn the associative array of['country_code'] => "Country Languages". - If the
$countryis defined,getLanguagesreturn the Languages of the country.
Parameters & Examples : same as getDatabase
Get the Area
- If the
$countryis not defined,getAreareturn the associative array of['country_code'] => "Country Area". - If the
$countryis defined,getAreareturn the Area of the country.
Parameters & Examples : same as getDatabase