Person::getFamilies - jcobban/Genealogy GitHub Wiki

$person->getFamilies()

Up: class Person

This factory method is used to obtain a RecordSet of all of the instances of Family in which this instance of Person is a spouse.

This returns an empty RecordSet if this Person is not a spouse in any Family. Otherwise it returns a RecordSet containing instances of class Family which are identified by the numeric 'IDMR' value identifying the corresponding record in table tblMR (or Families).

For example:

$families                  = $person->getFamilies();
$numFamilies	           = count($families);
foreach($families as $idmr => $family)
{
    ...
}

Next: $person->getParents()