Domain::get - jcobban/Genealogy GitHub Wiki
$domain->get($fieldname)
Up: class Domain
This gets the current value of the identified field. It has one parameter:
parameter | description |
---|---|
$field | The field name is case insensitive and may be a synonym defined by the derived class to facilitate readability. Late static binding is used so this method takes advantage of field name definitions in the derived class. The field name may also be a temporary field defined by assigning a value to it in the set method. This method creates a trace entry if the field name does not correspond to any field in the record and debugging is enabled. |
It overloads the base implementation as follows:
field name | description |
---|---|
'domain' | returns the domain identifier in the form specified by ISO 3166-2 but with the hyphen omitted because only 2-character country codes are supported. for example 'AUNSW'. Synonym 'code'. |
'iso' | returns the domain identifier in the form specified by ISO 3166-2 including the hyphen separating the country code from the code for the lower level administrative area, for example 'AU-NSW' |
'countrycode' | returns the country code portion of the domain code. Synonym 'cc'. |
'state' | returns the portion of the domain identifier after the country code. Synonyms 'statecode', 'prov', 'province'. |
'partof' | If this Domain is a highest level administrative domain under a country, for example a state in a federal state, then this returns the country code. Otherwise it returns the ISO 3166-1 code for the next higher level domain, including the hyphen between the country code and the sub-domain identifier. |
This method returns the current value of the field. This method returns null if the field name does not correspond to any field in the record, and generates a warning message.