Person::getParents - jcobban/Genealogy GitHub Wiki
$person->getParents()
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 child.
This returns an empty RecordSet
if this Person
is not a child in any Family
, that is no parents have been recorded. 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:
$parents = $person->getParents();
$numParents = count($parents);
foreach($parents as $idmr => $family)
{
$father = $family->getHusband();
$mother = $family->getWife();
...
}
Next: $person->get($fieldname)