new Name - jcobban/Genealogy GitHub Wiki
new Name($parms)
Up: class Name
The constructor for an instance of Name 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.
array('idnx' => integer)
specifies the unique numeric key of the existing record in the table that is to be used to initialize the new instance.array('idir' => $idir)
returns the primary name of a Person.array(‘idir' => $idir, ‘type' => Name::PRIMARY)
returns the primary name of a Person.array('idir' => $idir, 'type' => positiveInt)
returns the specific existing alternate name of a Person.array('idir' => $idir, 'type' => 'alt')
returns a new alternate name of a Person.array('idir' => $idir, 'givenname' => $givenname, 'surname' => $surname)
returns the alternate name of a Person that matches the specified givenname and surname. If there is no such alternate name it creates a new record with those values.array('idir' => $idir, 'idmr' => $idmr)
returns the married name entry for the particular Person as a spouse in the specified family.
In all of these variations $idir may be either an IDIR value or an instance of class Person and $idmr may be either an IDMR value or an instance of class Family.
The constructor adds error messages to $record->msg
if it is unable to complete due to bad parameters.