class Picture - jcobban/Genealogy GitHub Wiki
Up: Object-Oriented Access to Database Records
This class is derived from Record to implement the logical interface to a record in the Pictures table ('Pictures' or 'tblBR'). Each entry in this table represents a picture/video/sound record in a genealogical database. This class also manages the supporting picture library table ('tblBP').
Fields
This record presents the following fields:
| field name | description | synonyms |
|---|---|---|
| 'idbr' | unique numeric identifier, internal use only | |
| 'idir' | unique internal identifier of record in Persons table, Families table, | |
| 'idtype' | identifier of the table to which 'idir' refers. See the IDTYPE... contants defined below. |
|
| 'pictype' | identifier of the type of document. See the PIC_TYPE_... constants defined below. |
'type' |
| 'picorder' | sort order of the "picture" within the record identified by 'idir' and 'idtype' |
|
| 'picname' | filename of the "picture" within the library identified by ';idbppic'; | 'name' |
| 'picnameurl' | full URL of the "picture" within another web-site. | 'nameurl' |
| 'idbppic' | unique internal identifier of a record in the tblBP table which identifies a library of "pictures". |
|
| 'piccaption' | caption | |
| 'picd' | internal representation of date of the "picture". See Class Date | 'd' |
| 'picsd' | sorting order of date yyyymmdd | 'sd' |
| 'picdate' | display the date of the picture? 1=yes, 0=no | 'date' |
| 'picdesc' | extended rich-text description of the picture | 'desc' |
| 'picprint' | display this picture when displaying the associated record | 'print' |
| 'picsoundname' | filename of a sound file within the library identified by 'idbpsound' |
'soundname' |
| 'picsoundnameurl' | full URL to a sound file on the internet | 'soundnameurl' |
| 'idbpsound' | unique internal identifier of a record in the tblBP table which identifies a library of sounds. |
|
| 'used' | does any record reference this instance of Picture? 1=yes, 0=no |
|
| 'picpref' | 1=preferred, 0=not | 'pref' |
| 'filingref' | user assigned filing number |
Constants
This class defines the following constants which indicate the table containing the record associated with an instance of Picture:
| constant | description | value |
|---|---|---|
| Picture::IDTYPEPerson | Individual tblIR.IDIR | 0 |
| Picture::IDTYPEBirth | Birth tblIR.IDIR | 1 |
| Picture::IDTYPEChris | Christening tblIR.IDIR | 2 |
| Picture::IDTYPEDeath | Death tblIR.IDIR | 3 |
| Picture::IDTYPEBuried | Burial tblIR.IDIR | 4 |
| Picture::IDTYPEMar | Marriage tblMR.IDMR | 20 |
| Picture::IDTYPEEvent | Events tblER.IDER | 30 |
| Picture::IDTYPESrcMaster | Master Sources tblSR.IDSR | 40 |
| Picture::IDTYPESrcDetail | Source Detail tblSX.IDSX | 41 |
| Picture::IDTYPEToDo | To Do tblTD.IDTD | 50 |
| Picture::IDTYPEAddress | Address tblAR.IDAR | 70 |
| Picture::IDTYPELocation | Location tblLR.IDLR | 71 |
| Picture::IDTYPETemple | Temple tblTR.IDTR | 72 |
| Picture::IDTYPEMAX | maximum value | 72 |
This class defines the following constants which indicate the type of picture represented by this instance of Picture:
| constant | description | value |
|---|---|---|
| Picture::PIC_TYPE_PICTURE | image file | 0 |
| Picture::PIC_TYPE_SOUND | sound file | 1 |
| Picture::PIC_TYPE_VIDEO | video file | 2 |
| Picture::PIC_TYPE_OTHER | other file | 3 |
| Picture::PIC_TYPE_MAX | maximum value | 3 |
Table of Contents
- new Picture($parms)
- $picture->getName()
- $picture->getURL()
- $picture->getSoundURL()
- $picture->getRecord()
- $picture->get($fieldname)
- $picture->set($fieldname, $value)
- $picture->toHtml($print)
- $picture->delete()
Next: new Picture($parms)