new Family - jcobban/Genealogy GitHub Wiki
new Family($parms)
Up: class Family
The constructor for an instance of Family 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('idmr' => integer)
specifies the unique numeric key of the record in the table that is to be used to initialize the new instance.array('id' => integer)
specifies the unique internal numeric key of the record in the table. DEPRECATEDarray('idirhusb' => $idir)
to add a new family for a husbandarray('idirwife' => $idir)
to add a new family for a wifearray('husbsurname' => $surname, 'husbmarrsurname' => $surname)
to create a new set of parents for a childarray('idirhusb'=> $idir, 'idirwife'=> $idir)
adds a new instance of Family between a groom and bride.
Note that you cannot obtain an existing record for a husband/wife pair except through new RecordSet('Families', array('idirhusb'=> $idir, 'idirwife'=> $idir))
.
The constructor adds error messages to $record->msg
if it is unable to complete due to bad parameters.
Next: $family->getName()