new Citation - jcobban/Genealogy GitHub Wiki
new Citation($parms)
Up: class Citation
The constructor for an instance of Citation takes one parameter:
parameter | description |
---|---|
$parms | identifies the database record to be associated with this instance. This is an associative array. |
$parms may be:
- An associative array containing all of the fields in a record as obtained by a database SELECT.
- An associative array containing the option
'idsx' => integer
that specifies the unique numeric key of the record in the table that is to be used to initialize the new instance, plus optional additional field name value pairs to modify the record retrieved from the database. - An associative array that does not contain the option
'idsx' => integer
requests the creation of a new record. The optional additional field name value pairs initialize the new record. The array may be empty in which case the new instance is created with all default values. - Omitted, in which case a new instance is created with all default values.
In the optional additional field name value pairs one field name has special support:
field name | interpretation |
---|---|
'idsr' | this may be either a positive integer or else an instance of class Source. |
The constructor adds error messages to $record->msg
if it is unable to complete due to bad parameters.