new CensusLine - jcobban/Genealogy GitHub Wiki

new CensusLine($parms)

Up: class CensusLine

The constructor for an instance of CensusLine takes one parameter:

parameter description
$parms identifies the database record to be associated with this instance. This is an associative array.
$line the line number on the page. If 0 the constructor returns the last line on the page preceding the page identified by $parms.

$parms may be:

  • An associative array containing all of the fields in a record as obtained by a database SELECT.
  • array('census' => string, 'district' => id, 'subdistrict' => id, 'division' => id, 'page' => page, 'line' => line) specifies the unique identification of the record in the table that is to be used to initialize the new instance. The exact set of values permitted for each of these parameters depends upon the organization of the enumeration. A special case is that 'line' => 0 indicates to retrieve the record corresponding to the highest line number of the preceding page. This functionality is required because the first line of a page is frequently the next individual in a family which started on the previous page.

The constructor adds error messages to $record->msg if it is unable to complete due to bad parameters.

Next: $line->get()