class Child - jcobban/Genealogy GitHub Wiki

Up: Object-Oriented Access to Database Records

Source Code

This class is derived from Record to implement the logical interface to a record in the Child Relationships table ('tblCR' or 'Children'). Each entry in this table contains information about the relationship between a child and the child's parents.

Fields

This record presents the following fields:

name description synonyms
'idcr' unique numeric key of record
'idmr' numeric key of instance of Family for parents
'idir' numeric key of instance of Person of the child
'order' order within Family 'childorder'
'prefchild' is this the preferred child (0=No, 1=Yes)
'idcs' status, see Child::STATUS_...
'idcpdad' relation to father, see Child::RELATE_...
'idcpmom' relation to mother, see Child::RELATE_...
'cpdadprivate' is the relation to father private? (0=No, 1=Yes)
'cpmomprivate' is the relation to mother private? (0=No, 1=Yes)

Constants

This class defines the following constants which modify the returned value from $child->getName():

constant description value
Child::NAME_INCLUDE_DATES include birth and death dates if defined 1
Child::NAME_SURNAME_FIRST show surname first 2
Child::NAME_INCLUDE_LOCS include birth and death locations if defined 4

This class defines the following constants which are the valid values of the 'status' field:

constant description value
Child::STATUS_NULL null 1
Child::STATUS_NONE none 2
Child::STATUS_STILLBORN stillborn 3
Child::STATUS_TWIN twin 4
Child::STATUS_ILLEGITIMATE illegitimate 5

This class defines the following constants which are the valid values of the 'idcp...' fields:

constant description value
Child::RELATE_NULL null 1
Child::RELATE_ADOPTED adopted 2
Child::RELATE_BIOLOGICAL biological 3
Child::RELATE_CHALLENGED challenged 4
Child::RELATE_DISPROVED disproved 5
Child::RELATE_FOSTER foster 6
Child::RELATE_GUARDIAN guardian 7
Child::RELATE_SEALING sealing 8
Child::RELATE_STEP step 9
Child::RELATE_UNKNOWN unknown 10
Child::RELATE_PRIVATE private 11
Child::RELATE_FAMILYMEMBER familymember 12
Child::RELATE_ILLEGITIMATE illegitimate 13

String values for interpreting these codes to the user are defined in the language specific translate table.

$translate         = $template->getTranslate();
$interpretation    = $translate['cpRelType'][$child['cpreldad']];

Table of Contents

Next: new Child($parms)