Event::set - jcobban/Genealogy GitHub Wiki

$event->set($fieldname, $value)

Up: class Event

This changes the value of the identified field and returns the former value. It has two parameters:

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 this method. This method creates a trace entry if the field name does not correspond to any field in the record and debugging is enabled.
$value The new value to assign to the field.

It overloads the base implementation as follows:

field name description
'idtype' value is validated for range
'eventd' support external date value identified by leading space
'idlrevent' support string location name or instance of Location or instance of Temple as well as the unique integer key of the associated record.

Next: $event->getAssociatedRecord()