You are here

function countries_api_get_formats in Country codes API 6

Same name and namespace in other branches
  1. 5 countries_api.module \countries_api_get_formats()

Funtion to return available formats

Return value

array Returns an array of available formats

2 calls to countries_api_get_formats()
CountriesAPITestCase::test_countries_api_get_formats in tests/countries_api.test
Function to test countries_api_get_formats() results
countries_api_validate_format in ./countries_api.module
Function to validate format argument

File

./countries_api.module, line 296
Countries API provides an API for official and up-to-date ISO 3166 country codes (alpha-2 and alpha-3) and names (official short names).

Code

function countries_api_get_formats() {
  return array(
    COUNTRIES_API_FORMAT_ISO2,
    COUNTRIES_API_FORMAT_ISO3,
    COUNTRIES_API_FORMAT_NAME,
    COUNTRIES_API_FORMAT_PRINTABLE_NAME,
    COUNTRIES_API_FORMAT_NUMCODE,
  );
}