Event::get - jcobban/Genealogy GitHub Wiki

$event->get($fieldname)

Up: class Event

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
'notes' If the value of the field is null returns ''. This field contains secondary information about the event.
'description' if the value of the field is null returns ''. This field contains information that is an integral part of the Event. For example for an occupation event it contains the job title.
'kind' if there is no column 'kind', which is true for records copied from Legacy Family Tree, return 0 which indicates a Location rather than a Temple.
'eventd' this returns the internal encoding of the date of the event.
'date' this returns the internal encoding of the date of the event.

If the requested column does not exist in the record the function returns null.

To work with the internal date value use $date‑>toString($privlim, $needon, $tranTab):

$date           = new LegacyDate($event['eventd'));
$date‑>toString($privlim, $needon, $tranTab);

Next: $event->set()