Person::set - jcobban/Genealogy GitHub Wiki
$person->set($fieldname, $value)
Up: class Person
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 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. |
It overloads the base implementation as follows:
field name | description |
---|---|
'idir' | Normally this field cannot be altered because it is assigned by the database server, so the attempt to set the value is ignored. However the support for loading a GEDCOM 5.5 file creates instances of Person that are identified by a character string. |
'gender' | In addition to specifying the value using the numeric constants Person::MALE, Person::FEMALE, and Person::UNKNOWN, this can also be set using strings "M", "MALE", "F", "FEMALE", "?" OR "UNKNOWN". |
'givenname' | The instances of class Name associated with this Person are updated. |
'surname' | The primary instance of class Name associated with this Person is updated. |
'soundslike' | The primary instance of class Name associated with this Person is updated. |
'prefix' | The primary instance of class Name associated with this Person is updated. |
'title' | The primary instance of class Name associated with this Person is updated. |
'userref' | The primary instance of class Name associated with this Person is updated. |
'namenote' | The primary instance of class Name associated with this Person is updated. |
'birthd' | The new value may be either a human readable date or an internal representation. This updates the preferred birth instance of class Event. The field 'birthsd' is also updated here and in all associated instances of class Name. |
'chrisd' | The new value may be either a human readable date or an internal representation. This updates the preferred christening instance of class Event. |
'death' | The new value may be either a human readable date or an internal representation. This updates the preferred death instance of class Event. |
'buriedd' | The new value may be either a human readable date or an internal representation. This updates the preferred buried/cremated instance of class Event. |
'baptismd' | The new value may be either a human readable date or an internal representation. This updates the preferred LDS baptism instance of class Event. |
'endowd' | The new value may be either a human readable date or an internal representation. This updates the preferred LDS endowment instance of class Event. |
'confirmationd' | The new value may be either a human readable date or an internal representation. This updates the preferred LDS confirmation instance of class Event. |
'initiatoryd' | The new value may be either a human readable date or an internal representation. This updates the preferred LDS initiatory instance of class Event. |
'idlrbirth' | The new value may either be the numeric key of an instance of class Location or the name of a Location as a string. This updates the preferred birth instance of class Event. |
'idlrchris' | The new value may either be the numeric key of an instance of class Location or the name of a Location as a string. This updates the preferred christening instance of class Event. |
'idlrdeath' | The new value may either be the numeric key of an instance of class Location or the name of a Location as a string. This updates the preferred death instance of class Event. |
'idlrburied' | The new value may either be the numeric key of an instance of class Location or the name of a Location as a string. This updates the preferred buried instance of class Event. |
'idtrbaptism' | The new value may either be the numeric key of an instance of class Temple or the name of a Temple as a string. This updates the preferred LDS baptism instance of class Event. |
'idtrendow' | The new value may either be the numeric key of an instance of class Temple or the name of a Temple as a string. This updates the preferred LDS endowment instance of class Event. |
'idtrconfirmation' | The new value may either be the numeric key of an instance of class Temple or the name of a Temple as a string. This updates the preferred LDS confirmation instance of class Event. |
'idtrinitiatory' | The new value may either be the numeric key of an instance of class Temple or the name of a Temple as a string. This updates the preferred LDS initiatory instance of class Event. |
'idarbirth' | The new value may either be the numeric key of an instance of class Address or the name of a Location as a string. This updates the preferred birth instance of class Event. |
'idarchris' | The new value may either be the numeric key of an instance of class Address or the name of a Location as a string. This updates the preferred christening instance of class Event. |
'idardeath' | The new value may either be the numeric key of an instance of class Address or the name of a Location as a string. This updates the preferred death instance of class Event. |
'idarburied' | The new value may either be the numeric key of an instance of class Address or the name of a Location as a string. This updates the preferred buried instance of class Event. |
cremated |
The new value may be specified as 0, 1, 'N', or 'Y'. |
living |
The new value may be specified as 0, 1, 'N', or 'Y'. |
baptismkind |
The new value may be specified as 0, 1, 'N', or 'Y'. |
ldsb |
The new value may be specified as 0, 1, 'N', or 'Y'. |
ldse |
The new value may be specified as 0, 1, 'N', or 'Y'. |
confirmationkind |
The new value may be specified as 0, 1, 'N', or 'Y'. |
ldsc |
The new value may be specified as 0, 1, 'N', or 'Y'. |
ldsi |
The new value may be specified as 0, 1, 'N', or 'Y'. |
templetag |
The new value may be specified as 0, 1, 'N', or 'Y'. |
fsdups |
The new value may be specified as 0, 1, 'N', or 'Y'. |
fsordinance |
The new value may be specified as 0, 1, 'N', or 'Y'. |
tag1 |
The new value may be specified as 0, 1, 'N', or 'Y'. |
tag2 |
The new value may be specified as 0, 1, 'N', or 'Y'. |
tag3 |
The new value may be specified as 0, 1, 'N', or 'Y'. |
tag4 |
The new value may be specified as 0, 1, 'N', or 'Y'. |
tag5 |
The new value may be specified as 0, 1, 'N', or 'Y'. |
tag6 |
The new value may be specified as 0, 1, 'N', or 'Y'. |
tag7 |
The new value may be specified as 0, 1, 'N', or 'Y'. |
tag8 |
The new value may be specified as 0, 1, 'N', or 'Y'. |
tag9 |
The new value may be specified as 0, 1, 'N', or 'Y'. |
taggroup |
The new value may be specified as 0, 1, 'N', or 'Y'. |
savetag |
The new value may be specified as 0, 1, 'N', or 'Y'. |
qstag |
The new value may be specified as 0, 1, 'N', or 'Y'. |
srchtag |
The new value may be specified as 0, 1, 'N', or 'Y'. |
srchtagigi |
The new value may be specified as 0, 1, 'N', or 'Y'. |
srchtagrg |
The new value may be specified as 0, 1, 'N', or 'Y'. |
srchtagfs |
The new value may be specified as 0, 1, 'N', or 'Y'. |
rgexclude |
The new value may be specified as 0, 1, 'N', or 'Y'. |
remindertag |
The new value may be specified as 0, 1, 'N', or 'Y'. |
remindertagdeath |
The new value may be specified as 0, 1, 'N', or 'Y'. |
alreadyused |
The new value may be specified as 0, 1, 'N', or 'Y'. |
imported |
The new value may be specified as 0, 1, 'N', or 'Y'. |
nevermarried |
The new value may be specified as 0, 1, 'N', or 'Y'. |
directline |
The new value may be specified as 0, 1, 'N', or 'Y'. |
fssync |
The new value is validated to be between 0 and 3. |
This method returns the former value of the field.