Citation::set - jcobban/Genealogy GitHub Wiki
$citation->set($field, $value)
Up: class Citation
This method alters the current value of the field identified by the field name parameter and returns the previous 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. 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. |
$oldvalue = $citation->set($field, $newvalue);
$citation[$field] = $newvalue; // synonym except old value is discarded
other set method | equivalent | notes |
---|---|---|
$cit->setIdsr($value) | $cit->set{'idsr', $value) | |
$cit->setIdime($value) | $cit->set{'idime', $value) | |
$cit->setCitType($value) | $cit->set{'type', $value) | |
$cit->setPage($value) | $cit->set{'srcdetail', $value) | |
$cit->setDetailText($value) | $cit->set{'srcdettext', $value) | |
$cit->setDetNote($value) | $cit->set{'srcdetnote', $value) | |
$cit->setOrder($value) | $cit->set{'order', $value) | |
$cit->setSurety($value) | $cit->set{'srcsurety', $value) | fails if value is out of range |
Next: $citation->toHTML()