class FamilyTree - jcobban/Genealogy GitHub Wiki
Up: Object-Oriented Access to Database Records
This class represents the top level functionality of the Family Tree. Only a single instance of this class is created in the common initialization code and assigned to the global variable $tree
. Its primary purpose is to provide a set of factory methods for obtaining existing instances of classes derived from class Record in such a way as to avoid creating duplicate instances.
It also provides access to the global settings table defined by Legacy Family Tree©, although that table is not used by this application. This class provides access to the information in the table tblHR.
CREATE TABLE `tblHR` (
`Item` VARCHAR(10) NOT NULL DEFAULT '',
`Setting` VARCHAR(255) DEFAULT NULL,
PRIMARY KEY (`Item`) )
ENGINE=InnoDB DEFAULT CHARSET=utf8
This class is not derived from class Record but implements part of the same interface.
Fields
This record presents the following fields:
name | description | synonyms |
---|---|---|
'item' | string identifier | |
'setting' | string value |
Table of Contents
- new FamilyTree()
- $tree->getPerson($idir)
- $tree->getLocation($idlr)
- $tree->getFamily($idmr)
- $tree->getEvent($ider)
- $tree->getTemple($idtr)
- $tree->getAddress($idar)
- $tree->getSource($idsr)
- $tree->getCitation($idsx)
- $tree->get($item)
- foreach($tree as $item => $setting)
- $tree->isValid()
- $tree->getErrors()
- $tree->dump($title)
- $tree->toXml($top, $print, $options)
- $tree->toJson($print, $options)
Next: new FamilyTree()