Skip to content

Child::set

James Cobban edited this page Apr 23, 2021 · 5 revisions

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

Up: class Child

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 class Child to facilitate readability. Late static binding is used so this method takes advantage of field name definitions in the class Child. The method can also define a temporary field.
$value The new value to assign to the field.

It overloads the base implementation as follows:

field name description
'idmr' unique numeric key of instance of class Family of the parents
'idir' unique numeric key of instance of class Person of the child.
'order' order in family
'prefchild' if value is equivalent to true this is set to 1, otherwise to 0
'idcs' only set if valid value Child::STATUS_...
'idcpdad' only set if valid value Child::RELATE_...
'idcpmom' only set if valid value Child::RELATE_...
'cpdadprivate' if value is equivalent to true this is set to 1, otherwise to 0
'cpmomprivate' if value is equivalent to true this is set to 1, otherwise to 0

Next: $child->save($xml)

Clone this wiki locally