/** * Sets a known child element of FamilySearchPlatform from an XML reader. * * @param \XMLReader $xml The reader. * @return bool Whether a child element was set. */ protected function setKnownChildElement(\XMLReader $xml) { $happened = parent::setKnownChildElement($xml); if ($happened) { return true; } else { if ($xml->localName == 'childAndParentsRelationship' && $xml->namespaceURI == 'http://familysearch.org/v1/') { $child = new Platform\Tree\ChildAndParentsRelationship($xml); if (!isset($this->childAndParentsRelationships)) { $this->childAndParentsRelationships = array(); } array_push($this->childAndParentsRelationships, $child); $happened = true; } else { if ($xml->localName == 'discussion' && $xml->namespaceURI == 'http://familysearch.org/v1/') { $child = new Platform\Discussions\Discussion($xml); if (!isset($this->discussions)) { $this->discussions = array(); } array_push($this->discussions, $child); $happened = true; } else { if ($xml->localName == 'user' && $xml->namespaceURI == 'http://familysearch.org/v1/') { $child = new Platform\Users\User($xml); if (!isset($this->users)) { $this->users = array(); } array_push($this->users, $child); $happened = true; } else { if ($xml->localName == 'merge' && $xml->namespaceURI == 'http://familysearch.org/v1/') { $child = new Platform\Tree\Merge($xml); if (!isset($this->merges)) { $this->merges = array(); } array_push($this->merges, $child); $happened = true; } else { if ($xml->localName == 'mergeAnalysis' && $xml->namespaceURI == 'http://familysearch.org/v1/') { $child = new Platform\Tree\MergeAnalysis($xml); if (!isset($this->mergeAnalyses)) { $this->mergeAnalyses = array(); } array_push($this->mergeAnalyses, $child); $happened = true; } else { if ($xml->localName == 'feature' && $xml->namespaceURI == 'http://familysearch.org/v1/') { $child = new Feature($xml); if (!isset($this->features)) { $this->features = array(); } array_push($this->features, $child); $happened = true; } } } } } } } return $happened; }