class Country extends Model

A country

Constants

TABLE

The name of the database table used for queries

Methods

string
getName()

Get the name of the country in the default language

string
getISO()

Get the ISO code of a country

string
getFlagLiteral()

Get the HTML to display a specific flag

static Country[]
getCountries()

Get all the countries in the database

static array
getCountriesWithISO()

Get an associative array with country ISO code as keys and country names as values

static int
getIdFromISO(string $iso)

Given a country's ISO, get its ID

static QueryBuilder
getQueryBuilder()

Get a query builder for countries

Details

at line line 46
string getName()

Get the name of the country in the default language

Return Value

string The name of the country

at line line 56
string getISO()

Get the ISO code of a country

Return Value

string The ISO code of the country

at line line 66
string getFlagLiteral()

Get the HTML to display a specific flag

Return Value

string HTML to generate a flag

at line line 76
static Country[] getCountries()

Get all the countries in the database

Return Value

Country[] An array of country objects

at line line 87
static array getCountriesWithISO()

Get an associative array with country ISO code as keys and country names as values

Return Value

array

at line line 112
static int getIdFromISO(string $iso)

Given a country's ISO, get its ID

Parameters

string $iso The two-letter ISO code of the country

Return Value

int The country's database ID

at line line 122
static QueryBuilder getQueryBuilder()

Get a query builder for countries

Return Value

QueryBuilder