District::get - jcobban/Genealogy GitHub Wiki

$district->get($fieldname)

Up: class District

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. 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
'd_id' the unique identifier of the instance within a Census. This value is almost always an integer but there are a handful of exceptions where it contains a fractional portion.
'd_sdcount' simulated field initialized from the contained instances of SubDistrict
'd_fcount' simulated field initialized from the contained instances of SubDistrict

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: $district->set($fieldname, $value)