Skip to content

new CitationSet

James Cobban edited this page Aug 18, 2021 · 6 revisions

new CitationSet($parms)

Up: class CitationSet

The constructor for an instance of CitationSet 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.
  • an array of instances of the class Citation to be converted into a RecordSet.
  • If this parameter is omitted, or is null, the object is empty. That is $set->count() is zero.

The field names that may be specified in the associative array format include:

field name description synonyms
'idsr' numeric identifier of Source
'idime' numeric identifier of Record describing the fact or event documented by this Citation 'idir', 'idmr', 'ider', 'idcr', 'idnx'
'type' This identifies which record type and which fields in that record contain the fact or event documented by this citation.
'idet' This is a field that is actually in the instance of Event which is identified by the 'idime' field of the Citation. If this is set the query is issued against 'tblSX LEFT JOIN tblER' and if 'type' was not specified it is set to Citation::EVENT_TYPE.
'srcdetail' identify the specific page or other identification within the Master Source 'detail'
'srcdettext' text from the source 'dettext'
'srcdetnote' commentary on the source 'detnote'
'enteredsd' entered date yyyymmdd
'enteredd' entered date internal representation
'filingref' filing ref
'order' sort order of citations to an event
'content' content
'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 Citation
'groupby' value of the GROUP BY clause

For example:

 $censuses       = new CitationSet(array('IDSR' => $idsr));

returns all instances of Citation for a particular instance of class Source.

 $censuses       = new CitationSet(array('IDSR' => $idsr, 'idet' => 3));

returns all instances of Citation for a particular instance of class Source which reference a birth Event. This query uses information from the associated instances of class Event to identify those Citations to include in the set.

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

Next: class Concession

Clone this wiki locally