Lines Matching refs:gedcom
49 public function make(string $xref, Tree $tree, string|null $gedcom = null): GedcomRecord|null argument
52 if ($gedcom !== null && preg_match('/^0(?: @[^@]+@)? ([A-Z_]+)/', $gedcom, $match)) {
55 return Registry::familyFactory()->make($xref, $tree, $gedcom);
57 return Registry::headerFactory()->make($xref, $tree, $gedcom);
59 return Registry::individualFactory()->make($xref, $tree, $gedcom);
61 return Registry::locationFactory()->make($xref, $tree, $gedcom);
63 return Registry::mediaFactory()->make($xref, $tree, $gedcom);
65 return Registry::noteFactory()->make($xref, $tree, $gedcom);
67 return Registry::repositoryFactory()->make($xref, $tree, $gedcom);
69 return Registry::sourceFactory()->make($xref, $tree, $gedcom);
71 return Registry::submitterFactory()->make($xref, $tree, $gedcom);
73 return Registry::submissionFactory()->make($xref, $tree, $gedcom);
79 Registry::familyFactory()->make($xref, $tree, $gedcom) ??
80 Registry::individualFactory()->make($xref, $tree, $gedcom) ??
81 Registry::mediaFactory()->make($xref, $tree, $gedcom) ??
82 Registry::noteFactory()->make($xref, $tree, $gedcom) ??
83 Registry::repositoryFactory()->make($xref, $tree, $gedcom) ??
84 Registry::sourceFactory()->make($xref, $tree, $gedcom) ??
85 Registry::submitterFactory()->make($xref, $tree, $gedcom) ??
86 Registry::submissionFactory()->make($xref, $tree, $gedcom) ??
87 Registry::locationFactory()->make($xref, $tree, $gedcom) ??
88 Registry::headerFactory()->make($xref, $tree, $gedcom) ??
89 …rray()->remember(self::class . $xref . '@' . $tree->id(), function () use ($xref, $tree, $gedcom) {
90 $gedcom ??= $this->gedcom($xref, $tree);
94 if ($gedcom === null && $pending === null) {
98 $xref = $this->extractXref($gedcom ?? $pending, $xref);
99 $type = $this->extractType($gedcom ?? $pending);
101 return $this->newGedcomRecord($type, $xref, $gedcom ?? '', $pending, $tree);
109 * @param string $gedcom an empty string for new/pending records
116 … public function new(string $xref, string $gedcom, string|null $pending, Tree $tree): GedcomRecord argument
118 return new GedcomRecord($xref, $gedcom, $pending, $tree);
136 * @param string $gedcom
142 …private function newGedcomRecord(string $type, string $xref, string $gedcom, string|null $pending,… argument
146 return Registry::familyFactory()->new($xref, $gedcom, $pending, $tree);
149 return Registry::headerFactory()->new($xref, $gedcom, $pending, $tree);
152 return Registry::individualFactory()->new($xref, $gedcom, $pending, $tree);
155 return Registry::mediaFactory()->new($xref, $gedcom, $pending, $tree);
158 return Registry::noteFactory()->new($xref, $gedcom, $pending, $tree);
161 return Registry::repositoryFactory()->new($xref, $gedcom, $pending, $tree);
164 return Registry::sourceFactory()->new($xref, $gedcom, $pending, $tree);
167 return Registry::submissionFactory()->new($xref, $gedcom, $pending, $tree);
170 return Registry::submitterFactory()->new($xref, $gedcom, $pending, $tree);
173 return $this->new($xref, $gedcom, $pending, $tree);
180 * @param string $gedcom
185 private function extractType(string $gedcom): string argument
187 if (preg_match('/^0(?: @' . Gedcom::REGEX_XREF . '@)? ([_A-Z0-9]+)/', $gedcom, $match)) {
191 throw new InvalidArgumentException('Invalid GEDCOM record: ' . $gedcom);
202 private function gedcom(string $xref, Tree $tree): string|null function in Fisharebest\\Webtrees\\Factories\\GedcomRecordFactory