Example #1
0
 /**
  * Create a GedcomRecord object from raw GEDCOM data.
  *
  * @param string      $xref
  * @param string      $gedcom  an empty string for new/pending records
  * @param string|null $pending null for a record with no pending edits,
  *                             empty string for records with pending deletions
  * @param Tree        $tree
  */
 public function __construct($xref, $gedcom, $pending, $tree)
 {
     parent::__construct($xref, $gedcom, $pending, $tree);
     if (preg_match('/\\n1 FILE (.+)/', $gedcom . $pending, $match)) {
         $this->file = $match[1];
     }
     if (preg_match('/\\n\\d TITL (.+)/', $gedcom . $pending, $match)) {
         $this->title = $match[1];
     }
 }