Skip to content

CountryName::get

James Cobban edited this page Dec 6, 2019 · 2 revisions

$countryName->get($fieldname)

Up: class CountryName

This gets the current value of the identified field. It has one parameter:

parameter description
$fieldname The field name is case insensitive and may be a synonym defined by the derived class to facilitate readability. 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 'name' field of the instance has not been initialized this returns the English name of the associated instance of class Country and sets the 'name' field so that if the instance of CountryName is saved the database will be updated.
'article' if the 'article' field of the instance has not been initialized this returns the value of the 'article' field of the associated instance of class Language and sets the 'article' field so that if the instance of CountryName is saved the database will be updated.
'possessive' if the 'possessive' field of the instance has not been initialized this returns the value of the 'possessive' field of the associated instance of class Language and sets the 'possessve' field so that if the instance of CountryName is saved the database will be updated.

This method returns the current value of the field. If the field normally contains a string but its value is null the method returns an empty string. This method returns null if the field name does not correspond to any field in the record, and generates a warning message if debugging is enabled.

Next: class County

Clone this wiki locally