/** * 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->rp_name->parse_tree($tree, $ver); if (isset($tree[0][1])) { $sub2 = $tree[0][1]; $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::PHONETIC, $off)) !== false) { $name = new RP_Name(); $name->parse_tree(array($sub2[$i1]), $ver); $this->phonetic_names[] = $name; $off = $i1 + 1; } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::ROMANIZED, $off)) !== false) { $name = new RP_Name(); $name->parse_tree(array($sub2[$i1]), $ver); $this->romanized_names[] = $name; $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; if (($i1 = parent::find_tag($tree, Rp_Tags::PLACE)) !== false) { $this->name = parent::parse_text($tree[$i1], Rp_Tags::PLACE); if (isset($tree[$i1][1])) { $sub2 = $tree[$i1][1]; if (($i2 = parent::find_tag($sub2, Rp_Tags::FORM)) !== false) { $this->place_form = parent::parse_text($sub2[$i2], Rp_Tags::FORM); } if (($i2 = parent::find_tag($sub2, Rp_Tags::MAP)) !== false) { $sub3 = $sub2[$i2][1]; if (($i3 = parent::find_tag($sub3, Rp_Tags::LATITUDE)) !== false) { $this->coordinates['Latitude'] = parent::parse_text($sub3[$i3], Rp_Tags::LATITUDE); } if (($i3 = parent::find_tag($sub3, Rp_Tags::LONGITUDE)) !== false) { $this->coordinates['Longitude'] = parent::parse_text($sub3[$i3], Rp_Tags::LONGITUDE); } } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::PHONETIC, $off)) !== false) { $name = new RP_Name(); $name->parse_tree(array($sub2[$i1]), $ver); $this->phonetic_names[] = $name; $off = $i1 + 1; } $off = 0; while (($i1 = parent::find_tag($sub2, Rp_Tags::ROMANIZED, $off)) !== false) { $name = new RP_Name(); $name->parse_tree(array($sub2[$i1]), $ver); $this->romanized_names[] = $name; $off = $i1 + 1; } $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; } } } }