new MarriageSet - jcobban/Genealogy GitHub Wiki

new MarriageSet($parms)

Up: class MarriageSet

The constructor for an instance of MarriageSet takes one parameter:

parameter description
$parms identifies the database records to be associated with this instance. This is an array.

$parms may be:

  • An associative array of fieldname => value pairs to define the subset of the records in the SQL table that are represented by this instance.
  • The parameter can also be an array of instances of the class Marriage to be converted into a RecordSet.
  • If this parameter is omitted, or null, the object is empty. That is $set->count() is zero.

All of the fields in the Marriage and MarriagIndi records may be used in the parameter. There are some notes:

fieldname description
regnum This may only be specified together with regyear. This must evaluate to an integer or an array with two elements each of which evaluates to an integer. If it is an array then all of the records with regnum from the lower value to the higher value are returned.
surname Result is sorted by name.
surnamesoundex Result is sorted by name.
givennames Result is sorted by name.
occupation Result is sorted by name.
religion Result is sorted by name.
fathername Result is sorted by name.
mothername Result is sorted by name.
witnessname Result is sorted by name.
witnessres Result is sorted by name.
marriageplace Result is sorted by name.
remarks Result is sorted by name.
age Result is sorted by name.
marstat Result is sorted by name.
place Result is sorted by name.
date Result is sorted by name.
byear Result is sorted by name.
regcounty Result is sorted by name.
regtownship Result is sorted by name.
originalvolume Result is sorted by name.
originalpage Result is sorted by name.
originalitem Result is sorted by name.

In addition there are the following special field names:

fieldname description
inchusband include Groom instances of MarriageIndi in the search. This parameter is only checked for presence. The value is ignored.
incwife include Bride instances of MarriageIndi in the search. This parameter is only checked for presence. The value is ignored.
incminister include Minister instances of MarriageIndi in the search. This parameter is only checked for presence. The value is ignored.
range range on calculated birth years. An integer between 1 and 50. Only applies if age is specified.
'limit' maximum number of entries to return
'offset' offset for retrieving part of the response set
'orderby' value of the ORDER BY clause to override the default from class DontMergeEntry
'groupby' value of the GROUP BY clause
givenname This is corrected to givennames.

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

Next: $marriageset->getSummary()