1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
<?php
namespace Gedcomx\Extensions\FamilySearch\Rt;
use Gedcomx\Conclusion\Fact;
use Gedcomx\Extensions\FamilySearch\FamilySearchPlatform;
use Gedcomx\Extensions\FamilySearch\Platform\Discussions\Comment;
use Gedcomx\Extensions\FamilySearch\Platform\Discussions\Discussion;
use Gedcomx\Extensions\FamilySearch\Platform\Tree\ChildAndParentsRelationship;
use Gedcomx\Extensions\FamilySearch\Platform\Tree\Merge;
use Gedcomx\Extensions\FamilySearch\Platform\Tree\MergeAnalysis;
use Gedcomx\Extensions\FamilySearch\Platform\Users\User;
use Gedcomx\Gedcomx;
use Gedcomx\Rt\GedcomxModelVisitorBase;
class FamilySearchPlatformModelVisitorBase extends GedcomxModelVisitorBase implements FamilySearchPlatformModelVisitor
{
public function visitFamilySearchPlatform(FamilySearchPlatform $fsp)
{
$this->visitGedcomx($fsp);
array_push($this->contextStack, $fsp);
$discussions = $fsp->getDiscussions();
if ($discussions != null) {
foreach ($discussions as $discussion) {
$discussion->accept($this);
}
}
$merges = $fsp->getMerges();
if ($merges != null) {
foreach ($merges as $merge) {
$merge->accept($this);
}
}
$mergeAnalyses = $fsp->getMergeAnalyses();
if ($mergeAnalyses != null) {
foreach ($mergeAnalyses as $merge) {
$merge->accept($this);
}
}
$childAndParentsRelationships = $fsp->getChildAndParentsRelationships();
if ($childAndParentsRelationships != null) {
foreach ($childAndParentsRelationships as $pcr) {
$pcr->accept($this);
}
}
$users = $fsp->getUsers();
if ($users != null) {
foreach ($users as $user) {
$user->accept($this);
}
}
array_pop($this->contextStack);
}
public function visitGedcomx(Gedcomx $gx)
{
parent::visitGedcomx($gx);
array_push($this->contextStack, $gx);
$discussions = $gx->findExtensionsOfType('Discussion');
if ($discussions != null) {
foreach ($discussions as $discussion) {
$discussion->accept($this);
}
}
$merges = $gx->findExtensionsOfType('Merge');
if ($merges != null) {
foreach ($merges as $merge) {
$merge->accept($this);
}
}
$mergeAnalyses = $gx->findExtensionsOfType('MergeAnalysis');
if ($mergeAnalyses != null) {
foreach ($mergeAnalyses as $merge) {
$merge->accept($this);
}
}
$childAndParentsRelationships = $gx->findExtensionsOfType('ChildAndParentsRelationship');
if ($childAndParentsRelationships != null) {
foreach ($childAndParentsRelationships as $pcr) {
$pcr->accept($this);
}
}
array_pop($this->contextStack);
}
public function visitChildAndParentsRelationship(ChildAndParentsRelationship $pcr)
{
array_push($this->contextStack, $pcr);
$this->visitConclusion($pcr);
$facts = $pcr->getFatherFacts();
if ($facts != null) {
foreach ($facts as $fact) {
$fact->accept($this);
}
}
$facts = $pcr->getMotherFacts();
if ($facts != null) {
foreach ($facts as $fact) {
$fact->accept($this);
}
}
array_pop($this->contextStack);
}
public function visitMergeAnalysis(MergeAnalysis $merge)
{
}
public function visitMerge(Merge $merge)
{
}
public function visitDiscussion(Discussion $discussion)
{
array_push($this->contextStack, $discussion);
$comments = $discussion->getComments();
if ($comments != null) {
foreach ($comments as $comment) {
$comment->accept($this);
}
}
array_pop($this->contextStack);
}
public function visitComment(Comment $comment)
{
}
public function visitUser(User $user)
{
}
}