Lines Matching refs:gedcom

78     protected string $gedcom;  variable in Fisharebest\\Webtrees\\GedcomRecord
99 * @param string $gedcom an empty string for new/pending records
104 public function __construct(string $xref, string $gedcom, string|null $pending, Tree $tree) argument
107 $this->gedcom = $gedcom;
166 preg_match('/^0 @[^@]*@ (\w+)/', $this->gedcom(), $match);
197 public function gedcom(): string function in Fisharebest\\Webtrees\\GedcomRecord
199 return $this->pending ?? $this->gedcom;
297 return $this->gedcom;
307 [$gedcom] = explode("\n", $this->gedcom . $this->pending, 2);
311 $gedcom .= "\n" . $fact->gedcom();
323 preg_match_all($pattern, $gedcom, $matches, PREG_SET_ORDER);
330 $gedcom = str_replace($match[0], '', $gedcom);
335 return $gedcom;
596 … if (preg_match_all('/\n(?:2 PLAC|3 (?:ROMN|FONE|_HEB)) +(.+)/', $event->gedcom(), $ged_places)) {
715 …if (preg_match('/\n3 TIME (([01]\d|2[0-3]):([0-5]\d):([0-5]\d))/', $chan->gedcom(), $match) === 1)…
719 … if (preg_match('/\n3 TIME (([01]\d|2[0-3]):([0-5]\d))/', $chan->gedcom(), $match) === 1) {
755 * @param string $gedcom
760 public function createFact(string $gedcom, bool $update_chan): void argument
762 $this->updateFact('', $gedcom, $update_chan);
782 * @param string $gedcom
788 public function updateFact(string $fact_id, string $gedcom, bool $update_chan): void argument
794 $gedcom = preg_replace('/[\r\n]+/', "\n", $gedcom);
795 $gedcom = trim($gedcom);
800 if ($gedcom !== '' && !preg_match('/^1 ' . Gedcom::REGEX_TAG . '/', $gedcom)) {
801 … throw new Exception('Invalid GEDCOM data passed to GedcomRecord::updateFact(' . $gedcom . ')');
807 $old_gedcom = $this->gedcom;
816 if ($gedcom !== '') {
817 $new_gedcom .= "\n" . $gedcom;
821 $new_gedcom .= "\n" . $this->updateChange($fact->gedcom());
823 $new_gedcom .= "\n" . $fact->gedcom();
829 $new_gedcom .= "\n" . $gedcom;
853 $this->gedcom = $new_gedcom;
864 * @param string $gedcom
869 public function updateRecord(string $gedcom, bool $update_chan): void argument
875 $gedcom = preg_replace('/[\r\n]+/', "\n", $gedcom);
876 $gedcom = trim($gedcom);
880 if (preg_match('/\n1 CHAN(\n[2-9].*)*/', $gedcom, $match)) {
881 $gedcom = strtr($gedcom, [$match[0] => $this->updateChange($match[0])]);
883 $gedcom .= $this->updateChange("\n1 CHAN");
891 'old_gedcom' => $this->gedcom(),
892 'new_gedcom' => $gedcom,
898 $this->pending = $gedcom;
905 $this->gedcom = $gedcom;
926 'old_gedcom' => $this->gedcom(),
957 …eg_match_all('/\n(\d) ' . Gedcom::REGEX_TAG . ' ' . $value . '/', $fact->gedcom(), $matches, PREG_…
958 $gedcom = $fact->gedcom();
962 … $gedcom = preg_replace('/' . $match[0] . '(\n' . $next_levels . '.*)*/', '', $gedcom);
964 $this->updateFact($fact->id(), $gedcom, $update_chan);
995 * @param string $gedcom
999 protected function addName(string $type, string $value, string $gedcom): void argument
1031 …l . ' (' . $fact_type . ') (.+)((\n[' . $sublevel . '-9].+)*)/m', $fact->gedcom(), $matches, PREG_…
1035 $this->addName('_MARNM', $match[2], $fact->gedcom());
1037 $this->addName($match[1], $match[2], $fact->gedcom());
1059 if ($this->gedcom !== '') {
1060 $gedcom_facts = preg_split('/\n(?=1)/', $this->gedcom);
1113 if (preg_match('/\n1 RESN (.+)/', $this->gedcom(), $match)) {
1158 * @param string $gedcom
1162 private function updateChange(string $gedcom): string argument
1164 $gedcom = preg_replace('/\n2 (DATE|_WT_USER).*(\n[3-9].*)*/', '', $gedcom);
1169 return $gedcom . "\n2 DATE " . $today . "\n3 TIME " . $now . "\n2 _WT_USER " . $author;