Exemple #1
0
 /**
  * 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::NOTE)) !== false) {
         $str = parent::parse_ptr_id($tree[$i1], Rp_Tags::NOTE);
         if (isset($str) && $str != '') {
             $this->id = $str;
         } else {
             $this->text = parent::parse_con_tag($tree[$i1], Rp_Tags::NOTE);
         }
     }
 }
 /**
  * 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 static function parse_tree_to_array($tree, $ver)
 {
     $events = array();
     foreach (Lds_Ordinance::_TYPES as $tag) {
         $off = 0;
         while (($i1 = parent::find_tag($tree, $tag, $off)) !== false) {
             $event = new RP_Lds_Ordinance();
             $event->code = $tag;
             $tmp = Lds_Ordinance::_TYPES;
             $event->type = $tmp[$tag];
             $event->to_gedcom_detail($tree[$i1], $ver);
             $events[] = $event;
             $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::REPOSITORY)) !== false) {
         $this->repository_id = parent::parse_ptr_id($tree[$i1], Rp_Tags::REPOSITORY);
         if (isset($tree[$i1][1])) {
             $sub2 = $tree[$i1][1];
             $off = 0;
             $idx = 0;
             while (($i2 = parent::find_tag($sub2, Rp_Tags::CALLNBR, $off)) !== false) {
                 $this->call_nbrs[$idx]['Nbr'] = parent::parse_text($sub2[$i2], Rp_Tags::CALLNBR);
                 if (isset($sub2[$i2][1])) {
                     if (($i3 = parent::find_tag($sub2[$i2][1], Rp_Tags::MEDIATYPE)) !== false) {
                         $this->call_nbrs[$idx]['Media'] = parent::parse_text($sub2[$i2][1][$i3], Rp_Tags::MEDIATYPE);
                     }
                 }
                 $off = $i2 + 1;
                 $idx++;
             }
             $off = 0;
             while (($i2 = parent::find_tag($sub2, Rp_Tags::NOTE, $off)) !== false) {
                 $tmp = new RP_Note();
                 $tmp->parse_tree(array($sub2[$i2]), $ver);
                 $this->notes[] = $tmp;
                 $off = $i2 + 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::PREFIX)) !== false) {
         $this->prefix = parent::parse_text($tree[$i1], Rp_Tags::PREFIX);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::GIVEN)) !== false) {
         $this->given = parent::parse_text($tree[$i1], Rp_Tags::GIVEN);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::NICK)) !== false) {
         $this->nick_name = parent::parse_text($tree[$i1], Rp_Tags::NICK);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::SURPREFIX)) !== false) {
         $this->surname_prefix = parent::parse_text($tree[$i1], Rp_Tags::SURPREFIX);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::SURNAME)) !== false) {
         $this->surname = parent::parse_text($tree[$i1], Rp_Tags::SURNAME);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::SUFFIX)) !== false) {
         $this->suffix = parent::parse_text($tree[$i1], Rp_Tags::SUFFIX);
     }
     $off = 0;
     while (($i1 = parent::find_tag($tree, Rp_Tags::NOTE, $off)) !== false) {
         $tmp = new RP_Note();
         $this->notes[] = $tmp->parse_tree(array($tree[$i1]), $ver);
         $off = $i1 + 1;
     }
     $off = 0;
     while (($i1 = parent::find_tag($tree, Rp_Tags::CITE, $off)) !== false) {
         $tmp = new RP_Citation();
         $this->citations[] = $tmp->parse_tree(array($tree[$i1]), $ver);
         $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)
 {
     if (isset($tree[0][1])) {
         $sub2 = $tree[0][1];
         $this->ged_c->parse_tree($sub2, $ver);
         if (empty($ver)) {
             $ver = $this->ged_c->ver;
         }
         $this->source_system->parse_tree($sub2, $ver);
         if (($i1 = parent::find_tag($sub2, Rp_Tags::DEST)) !== false) {
             $this->destination_system = parent::parse_text($sub2[$i1], Rp_Tags::DEST);
         }
         if (($i1 = parent::find_tag($sub2, Rp_Tags::DATE)) !== false) {
             $this->transmission_date_time = parent::parse_text($sub2[$i1], Rp_Tags::DATE);
             if (isset($sub2[$i1][1])) {
                 if (($i2 = parent::find_tag($sub2[$i1][1], Rp_Tags::TIME)) !== false) {
                     $this->transmission_date_time .= ' ' . parent::parse_text($sub2[$i1][1][$i2], Rp_Tags::TIME);
                 }
             }
         }
         if (($i1 = parent::find_tag($sub2, Rp_Tags::FILE)) !== false) {
             $this->filename = parent::parse_text($sub2[$i1], Rp_Tags::FILE);
         }
         if (($i1 = parent::find_tag($sub2, Rp_Tags::COPYRIGHT)) !== false) {
             $this->copyright = parent::parse_text($sub2[$i1], Rp_Tags::COPYRIGHT);
         }
         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::SUBMITTER)) !== false) {
             $this->submitter_id = parent::parse_ptr_id($sub2[$i1], Rp_Tags::SUBMITTER);
         }
         if (($i1 = parent::find_tag($sub2, Rp_Tags::SUBMISSION)) !== false) {
             $this->submission_id = parent::parse_ptr_id($sub2[$i1], Rp_Tags::SUBMISSION);
         }
         $this->character_set->parse_tree($sub2, $ver);
         $this->note->parse_tree($sub2, $ver);
         if (($i1 = parent::find_tag($sub2, Rp_Tags::PLACE)) !== false) {
             if (isset($sub2[$i1][1])) {
                 if (($i2 = parent::find_tag($sub2[$i1][1], Rp_Tags::FORM)) !== false) {
                     $this->place_form = parent::parse_text($sub2[$i1][1][$i2], Rp_Tags::FORM);
                 }
             }
         }
     }
 }
 /**
  * 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::CORP)) !== false) {
         $this->name = parent::parse_text($tree[$i1], Rp_Tags::CORP);
         if (isset($tree[$i1][1])) {
             $sub2 = $tree[$i1][1];
             if (isset($this->address)) {
                 $this->address->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->ver = $ver;
     if (($i1 = parent::find_tag($tree, Rp_Tags::ADDR)) !== false) {
         $this->address = parent::parse_con_tag($tree[$i1], Rp_Tags::ADDR);
         if (isset($tree[$i1][1])) {
             $sub2 = $tree[$i1][1];
             if (($i2 = parent::find_tag($sub2, Rp_Tags::ADDR1)) !== false) {
                 $this->address_line1 = parent::parse_text($sub2[$i2], Rp_Tags::ADDR1);
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::ADDR2)) !== false) {
                 $this->address_line2 = parent::parse_text($sub2[$i2], Rp_Tags::ADDR2);
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::ADDR3)) !== false) {
                 $this->address_line3 = parent::parse_text($sub2[$i2], Rp_Tags::ADDR3);
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::CITY)) !== false) {
                 $this->city = parent::parse_text($sub2[$i2], Rp_Tags::CITY);
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::STATE)) !== false) {
                 $this->state = parent::parse_text($sub2[$i2], Rp_Tags::STATE);
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::POSTAL)) !== false) {
                 $this->postal_code = parent::parse_text($sub2[$i2], Rp_Tags::POSTAL);
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::CTRY)) !== false) {
                 $this->country = parent::parse_text($sub2[$i2], Rp_Tags::CTRY);
             }
         }
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::PHONE)) !== false) {
         $this->phone = parent::parse_text($tree[$i1], Rp_Tags::PHONE);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::EMAIL)) !== false) {
         $this->email = parent::parse_text($tree[$i1], Rp_Tags::EMAIL);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::FAX)) !== false) {
         $this->fax = parent::parse_text($tree[$i1], Rp_Tags::FAX);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::WWW)) !== false) {
         $this->www = parent::parse_text($tree[$i1], Rp_Tags::WWW);
     }
 }
 /**
  * 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;
             }
         }
     }
 }
 /**
  * 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::ASSOCIATION)) !== false) {
         $this->associate_id = parent::parse_ptr_id($tree[$i1], Rp_Tags::ASSOCIATION);
         if (isset($tree[$i1][1])) {
             $sub2 = $tree[$i1][1];
             if (($i2 = parent::find_tag($sub2, Rp_Tags::RELATIONSHIP)) !== false) {
                 $this->relationship = parent::parse_text($sub2[$i2], Rp_Tags::RELATIONSHIP);
             }
             $off = 0;
             while (($i1 = parent::find_tag($sub2, Rp_Tags::CITE, $off)) !== false) {
                 $tmp = new RP_Citation();
                 $tmp->parse_tree(array($sub2[$i1]), $ver);
                 $this->citations[] = $tmp;
                 $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;
             }
         }
     }
 }
Exemple #10
0
 /**
  * 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::GEDC)) !== false) {
         if (isset($tree[$i1][1])) {
             $sub2 = $tree[$i1][1];
             if (($i2 = parent::find_tag($sub2, Rp_Tags::VERSION)) !== false) {
                 $this->ver_nbr = parent::parse_text($sub2[$i2], Rp_Tags::VERSION);
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::FORM)) !== false) {
                 $this->form = parent::parse_text($sub2[$i2], Rp_Tags::FORM);
             }
         }
     }
 }
 /**
  * @todo Description of function noteParseTree
  * @param  $subTree
  * @param  $ver
  * @return
  */
 public function note_parse_tree($sub_tree, $ver)
 {
     $off = 0;
     while (($i1 = parent::find_tag($sub_tree, Rp_Tags::NOTE, $off)) !== false) {
         $tmp = new RP_Note();
         $tmp->parse_tree(array($sub_tree[$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)
 {
     if (($i1 = parent::find_tag($tree, Rp_Tags::SOURCE)) !== false) {
         $this->system_id = parent::parse_text($tree[$i1], Rp_Tags::SOURCE);
         if (isset($tree[$i1][1])) {
             $sub2 = $tree[$i1][1];
             if (($i2 = parent::find_tag($sub2, Rp_Tags::VERSION)) !== false) {
                 $this->ver_nbr = parent::parse_text($sub2[$i2], Rp_Tags::VERSION);
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::NAME)) !== false) {
                 $this->product_name = parent::parse_text($sub2[$i2], Rp_Tags::NAME);
             }
             $this->corporation->parse_tree($sub2, $ver);
             $this->rp_data->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
  */
 protected function parse_tree_detail($tree, $ver)
 {
     if (($i1 = parent::find_tag($tree, Rp_Tags::TYPE)) !== false) {
         $this->type = parent::parse_text($tree[$i1], Rp_Tags::TYPE);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::DATE)) !== false) {
         $this->date = parent::parse_text($tree[$i1], Rp_Tags::DATE);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::ADDRESS)) !== false) {
         $this->address->parse_tree(array($tree[$i1]), $ver);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::PLACE)) !== false) {
         $this->place->parse_tree(array($tree[$i1]), $ver);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::RELIGION)) !== false) {
         $this->religious_affiliation = parent::parse_text($tree[$i1], Rp_Tags::RELIGION);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::AGENCY)) !== false) {
         $this->resp_agency = parent::parse_text($tree[$i1], Rp_Tags::AGENCY);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::AGE)) !== false) {
         $this->age = parent::parse_text($tree[$i1], Rp_Tags::AGE);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::RESTRICTION)) !== false) {
         $this->restriction = parent::parse_text($tree[$i1], Rp_Tags::RESTRICTION);
     }
     if (($i1 = parent::find_tag($tree, Rp_Tags::CAUSE)) !== false) {
         $this->cause = parent::parse_text($tree[$i1], Rp_Tags::CAUSE);
     }
     if (isset($this->place)) {
         $this->place->parse_tree($tree, $ver);
     }
     if (isset($this->address)) {
         $this->address->parse_tree($tree, $ver);
     }
     $off = 0;
     while (($i1 = parent::find_tag($tree, Rp_Tags::CITE, $off)) !== false) {
         $tmp = new RP_Citation();
         $tmp->parse_tree(array($tree[$i1]), $ver);
         $this->citations[] = $tmp;
         $off = $i1 + 1;
     }
     $off = 0;
     while (($i1 = parent::find_tag($tree, Rp_Tags::MEDIA, $off)) !== false) {
         $tmp = new RP_Media_Link();
         $tmp->parse_tree(array($tree[$i1]), $ver);
         $this->media_links[] = $tmp;
         $off = $i1 + 1;
     }
     $off = 0;
     while (($i1 = parent::find_tag($tree, Rp_Tags::NOTE, $off)) !== false) {
         $tmp = new RP_Note();
         $tmp->parse_tree(array($tree[$i1]), $ver);
         $this->notes[] = $tmp;
         $off = $i1 + 1;
     }
 }
Exemple #14
0
 /**
  * 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
  * @param string $top  relevant top lvl tag name
  *
  * @return void
  *
  * @access public
  * @since Method available since Release 0.0.1
  */
 public function parse_tree($tree, $ver, $top = Rp_Tags::FULL)
 {
     $this->ver = $ver;
     if (($i1 = parent::find_tag($tree, $top)) !== false) {
         $this->full = parent::parse_text($tree[$i1], $top);
         if (isset($tree[$i1][1])) {
             $sub2 = $tree[$i1][1];
             if (($i2 = parent::find_tag($sub2, Rp_Tags::TYPE)) !== false) {
                 $this->type = parent::parse_text($sub2[$i2], Rp_Tags::TYPE);
             }
             $this->pieces->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->ver = $ver;
     if (($i1 = parent::find_tag($tree, Rp_Tags::CHANGEDATE)) !== false) {
         $sub2 = $tree[$i1][1];
         if (($i2 = parent::find_tag($sub2, Rp_Tags::DATE)) !== false) {
             $this->date = parent::parse_text($sub2[$i2], Rp_Tags::DATE);
             if (isset($sub2[$i2][1])) {
                 if (($i3 = parent::find_tag($sub2[$i2][1], Rp_Tags::TIME)) !== false) {
                     $this->time = parent::parse_text($sub2[$i2][1][$i3], Rp_Tags::TIME);
                 }
             }
             $off = 0;
             while (($i2 = parent::find_tag($sub2, Rp_Tags::NOTE, $off)) !== false) {
                 $tmp = new RP_Note();
                 $tmp->parse_tree(array($sub2[$i2]), $ver);
                 $this->notes[] = $tmp;
                 $off = $i2 + 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::SOURCE)) !== false) {
         $this->source_id = parent::parse_ptr_id($tree[$i1], Rp_Tags::SOURCE);
         if (isset($tree[$i1][1])) {
             $sub2 = $tree[$i1][1];
             if (($i2 = parent::find_tag($sub2, Rp_Tags::PAGE)) !== false) {
                 $this->page = parent::parse_text($sub2[$i2], Rp_Tags::PAGE);
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::QUAY)) !== false) {
                 $this->quay = parent::parse_text($sub2[$i2], Rp_Tags::QUAY);
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::EVENTTYPE)) !== false) {
                 $this->event_type = parent::parse_text($sub2[$i2], Rp_Tags::EVENTTYPE);
                 if (isset($sub2[$i2][1])) {
                     if (($i3 = parent::find_tag($sub2[$i2][1], Rp_Tags::ROLE)) !== false) {
                         $this->role_in_event = parent::parse_text($sub2[$i2][1][$i3], Rp_Tags::ROLE);
                     }
                 }
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::DATA)) !== false) {
                 $sub3 = $sub2[$i2][1];
                 if (isset($sub3)) {
                     if (($i3 = parent::find_tag($sub3, Rp_Tags::DATE)) !== false) {
                         $this->entry_date = parent::parse_text($sub3[$i3], Rp_Tags::DATE);
                     }
                     $off = 0;
                     while (($i3 = parent::find_tag($sub3, Rp_Tags::TEXT, $off)) !== false) {
                         $this->texts[] = parent::parse_con_tag($sub3[$i3], Rp_Tags::TEXT);
                         $off = $i3 + 1;
                     }
                 }
             }
             $off = 0;
             while (($i2 = parent::find_tag($sub2, Rp_Tags::MEDIA, $off)) !== false) {
                 $tmp = new RP_Media_Link();
                 $tmp->parse_tree(array($sub2[$i2]), $ver);
                 $this->media_links[] = $tmp;
                 $off = $i2 + 1;
             }
             $off = 0;
             while (($i2 = parent::find_tag($sub2, Rp_Tags::NOTE, $off)) !== false) {
                 $tmp = new RP_Note();
                 $tmp->parse_tree(array($sub2[$i2]), $ver);
                 $this->notes[] = $tmp;
                 $off = $i2 + 1;
             }
         }
     }
 }
Exemple #17
0
 /**
  * Extracts attribute contents FROM a parent tree object
  *
  * @param array  $tree an array containing an array FROM which the
  * object rpData should be extracted
  * @param string $ver  represents the version of the GEDCOM standard
  * rpData is being extracted from
  *
  * @return void
  *
  * @access public
  * @since Method available since Release 0.0.1
  */
 public function parse_tree($tree, $ver)
 {
     if (($i1 = parent::find_tag($tree, Rp_Tags::DATA)) !== false) {
         $this->source_name = parent::parse_text($tree[$i1], Rp_Tags::DATA);
         if (isset($tree[$i1][1])) {
             $sub2 = $tree[$i1][1];
             if (($i2 = parent::find_tag($sub2, Rp_Tags::DATE)) !== false) {
                 $this->date .= parent::parse_text($sub2[$i2], Rp_Tags::DATE);
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::COPYRIGHT)) !== false) {
                 $this->copyright .= parent::parse_con_tag($sub2[$i2], Rp_Tags::COPYRIGHT);
             }
         }
     }
 }
 /**
  * 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::FILE)) !== false) {
         $this->ref_nbr = parent::parse_text($tree[$i1], Rp_Tags::FILE);
         if (isset($tree[$i1][1])) {
             $sub2 = $tree[$i1][1];
             if (($i2 = parent::find_tag($sub2, Rp_Tags::FORMAT)) !== false) {
                 $this->format = parent::parse_text($sub2[$i2], Rp_Tags::FORMAT);
                 if (isset($sub2[$i2][1])) {
                     if (($i3 = parent::find_tag($sub2[$i2][1], Rp_Tags::TYPE)) !== false) {
                         $this->format_type = parent::parse_text($sub2[$i2][1][$i3], Rp_Tags::TYPE);
                     }
                 }
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::TITLE)) !== false) {
                 $this->title = parent::parse_text($sub2[$i2], Rp_Tags::TITLE);
             }
         }
     }
 }
 /**
  * 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
  * @param string $tag  FAMS or FAMC
  *
  * @return void
  *
  * @access public
  * @since Method available since Release 0.0.1
  */
 public function parse_tree($tree, $ver, $tag = Rp_Tags::SPOUSEFAMILY)
 {
     $this->ver = $ver;
     if (($i1 = parent::find_tag($tree, $tag)) !== false) {
         $this->family_id = parent::parse_ptr_id($tree[$i1], $tag);
         if (isset($tree[$i1][1])) {
             $sub2 = $tree[$i1][1];
             $off = 0;
             while (($i2 = parent::find_tag($sub2, Rp_Tags::NOTE, $off)) !== false) {
                 $tmp = new RP_Note();
                 $tmp->parse_tree(array($sub2[$i2]), $ver);
                 $this->notes[] = $tmp;
                 $off = $i2 + 1;
             }
             if ($tag == Rp_Tags::CHILDFAMILY) {
                 if (($i2 = parent::find_tag($sub2, Rp_Tags::LINKTYPE)) !== false) {
                     $this->linkage_type = parent::parse_text($sub2[$i2], Rp_Tags::LINKTYPE);
                 }
                 if (($i2 = parent::find_tag($sub2, Rp_Tags::LINKSTATUS)) !== false) {
                     $this->linkage_status = parent::parse_text($sub2[$i2], Rp_Tags::LINKSTATUS);
                 }
             }
         }
     }
 }
 /**
  * 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::MEDIA)) !== false) {
         $str = parent::parse_ptr_id($tree[$i1], Rp_Tags::MEDIA);
         if (isset($str) && $str != '') {
             $this->id = $str;
         } else {
             $sub2 = $tree[$i1][1];
             if (($i2 = parent::find_tag($sub2, Rp_Tags::TITLE)) !== false) {
                 $this->title = parent::parse_text($sub2[$i2], Rp_Tags::TITLE);
             }
             $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;
             }
         }
     }
 }
 /**
  * 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::DATA)) !== false) {
         if (isset($tree[$i1][1])) {
             $sub2 = $tree[$i1][1];
             $off = 0;
             while (($i2 = parent::find_tag($sub2, Rp_Tags::EVENT, $off)) !== false) {
                 $event = array('Types' => '', 'Date' => '', 'Jurisdiction' => '');
                 $event['Types'] = parent::parse_text($sub2[$i2], Rp_Tags::EVENT);
                 if (isset($sub2[$i2][1])) {
                     $sub2_sub = $sub2[$i2][1];
                     if (($i3 = parent::find_tag($sub2_sub, Rp_Tags::DATE)) !== false) {
                         $event['Date'] = parent::parse_text($sub2_sub[$i3], Rp_Tags::DATE);
                     }
                     if (($i3 = parent::find_tag($sub2_sub, Rp_Tags::PLACE)) !== false) {
                         $event['Jurisdiction'] = parent::parse_text($sub2_sub[$i3], Rp_Tags::PLACE);
                     }
                 }
                 $this->recorded_events[] = $event;
                 $off = $i2 + 1;
             }
             if (($i2 = parent::find_tag($sub2, Rp_Tags::AGENCY)) !== false) {
                 $this->responsible_agency = parent::parse_text($sub2[$i2], Rp_Tags::AGENCY);
             }
             $off = 0;
             while (($i2 = parent::find_tag($sub2, Rp_Tags::NOTE, $off)) !== false) {
                 $tmp = new RP_Note();
                 $tmp->parse_tree(array($sub2[$i2]), $ver);
                 $this->notes[] = $tmp;
                 $off = $i2 + 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::CHAR)) !== false) {
         $this->character_set = parent::parse_text($tree[$i1], Rp_Tags::CHAR);
     }
     if (isset($tree[$i1][1])) {
         $sub2 = $tree[$i1][1];
         if (($i2 = parent::find_tag($sub2, Rp_Tags::VERSION)) !== false) {
             $this->ver_nbr = parent::parse_text($sub2[$i2], Rp_Tags::VERSION);
         }
     }
 }