/**
  * 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->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;
             }
         }
     }
 }