new DomainSet - jcobban/Genealogy GitHub Wiki
new DomainSet($parms)
Up: class DomainSet
The constructor for an instance of DomainSet
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 parameters 'offset', 'limit', 'groupby',and 'order' are reserved to set the OFFSET, LIMIT, GROUP BY and ORDER BY clauses. - The parameter can also be an array of instances of the
class Domain
to be converted into aRecordSet
. - If this parameter is omitted, or
null
, the object is empty. That is$set->count()
is zero.
The constructor throws an exception or adds error messages to $record->msg
if it is unable to complete due to bad parameters.
Examples:
$domainParms = array(‘cc' => 'CA', 'lang' => 'en');
$domains = new DomainSet($getParms);
returns the set of instances of class Domain
in Canada, that is the set of provinces and territories with their English descriptions.
Next: class DontMergeEntry