new County - jcobban/Genealogy GitHub Wiki
new County($parms)
Up: class County
The constructor for an instance of County
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('domain' => string, 'code' => string)
specifies the unique keys of the record in the table that is to be used to initialize the new instance. If'domain'
is omitted the default is 'CA-ON' for Ontario, Canada.'domain'
may also be an instance of class Domain. The'code'
parameter is the unique identifier string for theCounty
within theDomain
.
If there is no matching record in the database $domain->isExisting()
returns false.
The constructor adds error messages to $record->msg
if it is unable to complete due to bad parameters.
Next: $county->getDomain()