Person::getEvents
James Cobban edited this page Nov 23, 2019
·
8 revisions
Up: class Person
This factory method is used to obtain a RecordSet
of all of the events associated with this instance of Person
. This method exists for symmetry with $child->getEvents() and $family->getEvents().
This returns an empty RecordSet
if there are no events associated with this Person. Otherwise it returns a RecordSet
containing instances of class Event which are identified either by the numeric 'ider'
value identifying the corresponding record in table tblER
(or Events
) or else by a string constant representing an Event that is still represented by the use of multiple fields within the Person
record itself, which is deprecated because it violates 3rd Normal Form (3NF).
For example:
$events = $person->getEvents();
$numEvents = count($events);
foreach($events as $ider => $event)
{
...
}