/** * Extracts attribute contents FROM a parent tree object * * @param array $tree an array containing an array FROM which the * object data should be extracted * @param string $ver represents the version of the GEDCOM standard * data is being extracted from * * @return void * * @access public * @since Method available since Release 0.0.1 */ public function parse_tree($tree, $ver) { $this->id = parent::parse_ref_id($tree[0], Rp_Tags::NOTE); $this->text = parent::parse_con_tag($tree[0], Rp_Tags::NOTE); if (isset($tree[0][1])) { $sub2 = $tree[0][1]; $this->user_file_parse_tree($sub2, $ver); $this->auto_rec_parse_tree($sub2, $ver); $this->change_date_parse_tree($sub2, $ver); $this->cite_parse_tree($sub2, $ver); } }
/** * Extracts attribute contents FROM a parent tree object * * @param array $tree an array containing an array FROM which the * object data should be extracted * @param string $ver represents the version of the GEDCOM standard * data is being extracted from * * @return void * * @access public * @since Method available since Release 0.0.1 */ public function parse_tree($tree, $ver) { $this->id = parent::parse_ref_id($tree[0], Rp_Tags::SOURCE); if (isset($tree[0][1])) { $sub2 = $tree[0][1]; $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::DATA, $off)) !== false) { $tmp = new RP_Source_Data(); $tmp->parse_tree(array($sub2[$i1]), $ver); $this->source_data[] = $tmp; $off = $i1 + 1; } if (($i1 = parent::find_tag($sub2, Rp_Tags::AUTHOR)) !== false) { $this->author = parent::parse_con_tag($sub2[$i1], Rp_Tags::AUTHOR); } if (($i1 = parent::find_tag($sub2, Rp_Tags::TITLE)) !== false) { $this->title = parent::parse_con_tag($sub2[$i1], Rp_Tags::TITLE); } if (($i1 = parent::find_tag($sub2, Rp_Tags::ABBR)) !== false) { $this->abbreviated_title = parent::parse_con_tag($sub2[$i1], Rp_Tags::ABBR); } if (($i1 = parent::find_tag($sub2, Rp_Tags::PUBLICATION)) !== false) { $this->publication_facts = parent::parse_con_tag($sub2[$i1], Rp_Tags::PUBLICATION); } if (($i1 = parent::find_tag($sub2, Rp_Tags::TEXT)) !== false) { $this->text = parent::parse_con_tag($sub2[$i1], Rp_Tags::TEXT); } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::REPOSITORY, $off)) !== false) { $tmp = new RP_Repository_Citation(); $tmp->parse_tree(array($sub2[$i1]), $ver); $this->repository_citations[] = $tmp; $off = $i1 + 1; } $this->user_file_parse_tree($sub2, $ver); $this->auto_rec_parse_tree($sub2, $ver); $this->change_date_parse_tree($sub2, $ver); $this->media_parse_tree($sub2, $ver); $this->note_parse_tree($sub2, $ver); } }