Skip to content

Name::set

James Cobban edited this page Nov 22, 2019 · 2 revisions

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

Up: class Name

This method changes the value of a specified field and returns the former value of the field. It has two parameters:

parameter description
$field The field name is case insensitive and may be a synonym defined by the derived class to facilitate readability. Late static binding is used so this method takes advantage of field name definitions in the derived class. The field name may also be a temporary field defined by assigning a value to it in this method. This method creates a trace entry if the field name does not correspond to any field in the record and debugging is enabled.
$value The new value to assign to the field.

This is overloaded as follows:

field name action
'idnr' ignored because this field is no longer in the record.
'gender' ignored because this field is no longer in the record.
'birthsd' ignored because this field is no longer in the record.
'birthd' ignored because this field is no longer in the record.
'deathsd' ignored because this field is no longer in the record.
'deathd' ignored because this field is no longer in the record.

Next: $name->save($xml)

Clone this wiki locally