Language::get - jcobban/Genealogy GitHub Wiki

$language->get($fieldname)

Up: class Language

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 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
'name' if the constructor was invoked with a country-qualified language code then this returns the name of the language qualified by the name of the country, for example "English(Canada)".
'nativename' if the constructor was invoked with a country-qualified language code then this returns the native name of the language qualified by the name of the country in the language, for example "Deutsch(Osterreich)".
'sorry' the value is guaranteed to be enclosed in an HTML paragraph <p> tag
'cc' if the constructor was invoked with a country-qualified language code then this returns the ISO country code identifier. Otherwise it returns null.

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.

Next: $language->getName()