/** * 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::REPOSITORY); if (isset($tree[0][1])) { $sub2 = $tree[0][1]; if (($i1 = parent::find_tag($sub2, Rp_Tags::NAME)) !== false) { $this->name = parent::parse_text($sub2[$i1], Rp_Tags::NAME); } $this->address->parse_tree($sub2, $ver); $this->user_file_parse_tree($sub2, $ver); $this->auto_rec_parse_tree($sub2, $ver); $this->change_date_parse_tree($sub2, $ver); $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::NOTE, $off)) !== false) { $tmp = new RP_Note(); $tmp->parse_tree(array($sub2[$i1]), $ver); $this->notes[] = $tmp; $off = $i1 + 1; } } }
/** * 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::MEDIA); if (isset($tree[0][1])) { $sub2 = $tree[0][1]; $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::FILE, $off)) !== false) { $tmp = new RP_Media_File(); $tmp->parse_tree(array($sub2[$i1]), $ver); $this->media_files[] = $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->cite_parse_tree($sub2, $ver); $this->note_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::FAMILY); if (isset($tree[0][1])) { $sub2 = $tree[0][1]; if (($i1 = parent::find_tag($sub2, Rp_Tags::RESTRICTION)) !== false) { $this->restriction = parent::parse_text($sub2[$i1], Rp_Tags::RESTRICTION); } $tmp = new RP_Event(); $this->events = $tmp->parse_tree_to_array($sub2, $ver); if (($i1 = parent::find_tag($sub2, Rp_Tags::HUSBAND)) !== false) { $this->husband = parent::parse_ptr_id($sub2[$i1], Rp_Tags::HUSBAND); } if (($i1 = parent::find_tag($sub2, Rp_Tags::WIFE)) !== false) { $this->wife = parent::parse_ptr_id($sub2[$i1], Rp_Tags::WIFE); } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::CHILD, $off)) !== false) { $this->children[] = parent::parse_ptr_id($sub2[$i1], Rp_Tags::CHILD); $off = $i1 + 1; } if (($i1 = parent::find_tag($sub2, Rp_Tags::CHILDCNT)) !== false) { $this->count_of_children = parent::parse_text($sub2[$i1], Rp_Tags::CHILDCNT); } // TODO add support for LdsSealing // $tmp = new RP_LdsSealing(); // $this->LdsSealings = $tmp->parseTreeToArray($sub2, $ver); $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::SUBMITTER, $off)) !== false) { $this->submitter_links[] = parent::parse_ptr_id($sub2[$i1], Rp_Tags::SUBMITTER); $off = $i1 + 1; } $this->common_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); } }
/** * 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::SUBMISSION); if (isset($tree[0][1])) { $sub2 = $tree[0][1]; if (($i1 = parent::find_tag($sub2, Rp_Tags::SUBMITTER)) !== false) { $this->submitter_id = parent::parse_ptr_id($sub2[$i1], Rp_Tags::SUBMITTER); } if (($i1 = parent::find_tag($sub2, Rp_Tags::FAMILYFILE)) !== false) { $this->family_file_name = parent::parse_text($sub2[$i1], Rp_Tags::FAMILYFILE); } if (($i1 = parent::find_tag($sub2, Rp_Tags::TEMPLECODE)) !== false) { $this->temple_code = parent::parse_text($sub2[$i1], Rp_Tags::TEMPLECODE); } if (($i1 = parent::find_tag($sub2, Rp_Tags::ANCESTORS)) !== false) { $this->generations_ancestors = parent::parse_text($sub2[$i1], Rp_Tags::ANCESTORS); } if (($i1 = parent::find_tag($sub2, Rp_Tags::DESCENDANTS)) !== false) { $this->generations_descendants = parent::parse_text($sub2[$i1], Rp_Tags::DESCENDANTS); } if (($i1 = parent::find_tag($sub2, Rp_Tags::ORDINANCEFLAG)) !== false) { $this->ordinance_process_flag = parent::parse_text($sub2[$i1], Rp_Tags::ORDINANCEFLAG); } if (($i1 = parent::find_tag($sub2, Rp_Tags::AUTORECID)) !== false) { $this->auto_rec_id = parent::parse_text($sub2[$i1], Rp_Tags::AUTORECID); } if (($i1 = parent::find_tag($sub2, Rp_Tags::CHANGEDATE)) !== false) { $this->change_date->parse_tree(array($sub2[$i1]), $ver); } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::NOTE, $off)) !== false) { $tmp = new RP_Note(); $tmp->parse_tree(array($sub2[$i1]), $ver); $this->notes[] = $tmp; $off = $i1 + 1; } } }
/** * 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::SUBMITTER); if (isset($tree[0][1])) { $sub2 = $tree[0][1]; if (($i1 = parent::find_tag($sub2, Rp_Tags::NAME)) !== false) { $this->name = parent::parse_text($sub2[$i1], Rp_Tags::NAME); } $this->address->parse_tree($sub2, $ver); $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::MEDIA, $off)) !== false) { $tmp = new RP_Media_Link(); $tmp->parse_tree(array($sub2[$i1]), $ver); $this->media_links[] = $tmp; $off = $i1 + 1; } if (($i1 = parent::find_tag($sub2, Rp_Tags::LANGUAGE)) !== false) { $this->language = parent::parse_text($sub2[$i1], Rp_Tags::LANGUAGE); } if (($i1 = parent::find_tag($sub2, Rp_Tags::RFN)) !== false) { $this->submitter_ref_nbr = parent::parse_text($sub2[$i1], Rp_Tags::RFN); } if (($i1 = parent::find_tag($sub2, Rp_Tags::AUTORECID)) !== false) { $this->auto_rec_id = parent::parse_text($sub2[$i1], Rp_Tags::AUTORECID); } if (($i1 = parent::find_tag($sub2, Rp_Tags::CHANGEDATE)) !== false) { $this->change_date->parse_tree(array($sub2[$i1]), $ver); } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::NOTE, $off)) !== false) { $tmp = new RP_Note(); $tmp->parse_tree(array($sub2[$i1]), $ver); $this->notes[] = $tmp; $off = $i1 + 1; } } }
/** * 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->ver = $ver; $this->id = parent::parse_ref_id($tree[0], Rp_Tags::INDIVIDUAL); if (isset($tree[0][1])) { $sub2 = $tree[0][1]; if (($i1 = parent::find_tag($sub2, Rp_Tags::RESTRICTION)) !== false) { $this->restriction = parent::parse_text($sub2[$i1], Rp_Tags::RESTRICTION); } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::FULL, $off)) !== false) { $tmp = new RP_Personal_Name(); $tmp->parse_tree(array($sub2[$i1]), $ver); $this->names[] = $tmp; $off = $i1 + 1; } if (($i1 = parent::find_tag($sub2, Rp_Tags::GENDER)) !== false) { $this->gender = parent::parse_text($sub2[$i1], Rp_Tags::GENDER); } $tmp = new RP_Event(); $this->events = $tmp->parse_tree_to_array($sub2, $ver); $tmp = new RP_Fact(); $this->attributes = $tmp->parse_tree_to_array($sub2, $ver); //TODO add support for LdsOrdinances //$this->LdsOrdinances = LdsOrdinance::parseTreeToArray($sub2, $ver); $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::CHILDFAMILY, $off)) !== false) { $tmp = new RP_Family_Link(); $tmp->parse_tree(array($sub2[$i1]), $ver, Rp_Tags::CHILDFAMILY); $this->child_family_links[] = $tmp; $off = $i1 + 1; } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::SPOUSEFAMILY, $off)) !== false) { $tmp = new RP_Family_Link(); $tmp->parse_tree(array($sub2[$i1]), $ver, Rp_Tags::SPOUSEFAMILY); $this->spouse_family_links[] = $tmp; $off = $i1 + 1; } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::SUBMITTER, $off)) !== false) { $this->submitter_links[] = parent::parse_ptr_id($sub2[$i1], Rp_Tags::SUBMITTER); $off = $i1 + 1; } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::ASSOCIATION, $off)) !== false) { $tmp = new RP_Association(); $tmp->parse_tree(array($sub2[$i1]), $ver); $this->associations[] = $tmp; $off = $i1 + 1; } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::ALIAS, $off)) !== false) { $this->aliases[] = parent::parse_ptr_id($sub2[$i1], Rp_Tags::ALIAS); $off = $i1 + 1; } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::ANCI, $off)) !== false) { $this->ancestor_interests[] = parent::parse_ptr_id($sub2[$i1], Rp_Tags::ANCI); $off = $i1 + 1; } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::DESI, $off)) !== false) { $this->descendant_interests[] = parent::parse_ptr_id($sub2[$i1], Rp_Tags::DESI); $off = $i1 + 1; } if (($i1 = parent::find_tag($sub2, Rp_Tags::PERMFILE)) !== false) { $this->perm_rec_file_nbr = parent::parse_text($sub2[$i1], Rp_Tags::PERMFILE); } if (($i1 = parent::find_tag($sub2, Rp_Tags::ANCFILE)) !== false) { $this->anc_file_nbr = parent::parse_text($sub2[$i1], Rp_Tags::ANCFILE); } $this->common_parse_tree($sub2, $ver); } }