Skip to content

new Picture

James Cobban edited this page May 31, 2022 · 1 revision

new Picture($parms)

Up: class Picture

The constructor for an instance of Picture 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('idbr' => integer) specifies the unique numeric key of the existing record in the table that is to be used to initialize the new instance.
  • array('idtype' => $idtype, 'idir' => $idir, 'pictype' => $pictype, 'picnameurl' => $url) specifies the minimal information required to create a new instance of Picture.

When adding a new instance of Picture 'idtype' and 'idir' identify the specific record in the family tree which the new picture is associated with. The new Picture is added after all of the existing records so the 'picorder' field is set to the number of existing pictures already associated with the family tree record.

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

Next: $picture->getName()

Clone this wiki locally