/** * Sets a known child element of ChildAndParentsRelationship 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 == 'father' && $xml->namespaceURI == 'http://familysearch.org/v1/') { $child = new ResourceReference($xml); $this->father = $child; $happened = true; } else { if ($xml->localName == 'mother' && $xml->namespaceURI == 'http://familysearch.org/v1/') { $child = new ResourceReference($xml); $this->mother = $child; $happened = true; } else { if ($xml->localName == 'child' && $xml->namespaceURI == 'http://familysearch.org/v1/') { $child = new ResourceReference($xml); $this->child = $child; $happened = true; } else { if ($xml->localName == 'fatherFact' && $xml->namespaceURI == 'http://familysearch.org/v1/') { $child = new Fact($xml); if (!isset($this->fatherFacts)) { $this->fatherFacts = array(); } array_push($this->fatherFacts, $child); $happened = true; } else { if ($xml->localName == 'motherFact' && $xml->namespaceURI == 'http://familysearch.org/v1/') { $child = new Fact($xml); if (!isset($this->motherFacts)) { $this->motherFacts = array(); } array_push($this->motherFacts, $child); $happened = true; } } } } } } return $happened; }
/** * Sets a known child element of Person 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 == 'living' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = ''; while ($xml->read() && $xml->hasValue) { $child = $child . $xml->value; } $this->living = $child; $happened = true; } else { if ($xml->localName == 'gender' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new Gender($xml); $this->gender = $child; $happened = true; } else { if ($xml->localName == 'name' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new Name($xml); if (!isset($this->names)) { $this->names = array(); } array_push($this->names, $child); $happened = true; } else { if ($xml->localName == 'fact' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new Fact($xml); if (!isset($this->facts)) { $this->facts = array(); } array_push($this->facts, $child); $happened = true; } else { if ($xml->localName == 'field' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new Field($xml); if (!isset($this->fields)) { $this->fields = array(); } array_push($this->fields, $child); $happened = true; } else { if ($xml->localName == 'display' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new DisplayProperties($xml); $this->displayExtension = $child; $happened = true; } } } } } } } return $happened; }
/** * Sets a known child element of Event 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 == 'date' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new DateInfo($xml); $this->date = $child; $happened = true; } else { if ($xml->localName == 'place' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new PlaceReference($xml); $this->place = $child; $happened = true; } else { if ($xml->localName == 'role' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new EventRole($xml); if (!isset($this->roles)) { $this->roles = array(); } array_push($this->roles, $child); $happened = true; } } } } return $happened; }
/** * Sets a known child element of PlaceDescription 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 == 'name' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new TextValue($xml); if (!isset($this->names)) { $this->names = array(); } array_push($this->names, $child); $happened = true; } else { if ($xml->localName == 'temporalDescription' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new DateInfo($xml); $this->temporalDescription = $child; $happened = true; } else { if ($xml->localName == 'latitude' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = ''; while ($xml->read() && $xml->hasValue) { $child = $child . $xml->value; } $this->latitude = $child; $happened = true; } else { if ($xml->localName == 'longitude' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = ''; while ($xml->read() && $xml->hasValue) { $child = $child . $xml->value; } $this->longitude = $child; $happened = true; } else { if ($xml->localName == 'spatialDescription' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new \Gedcomx\Common\ResourceReference($xml); $this->spatialDescription = $child; $happened = true; } else { if ($xml->localName == 'jurisdiction' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new \Gedcomx\Common\ResourceReference($xml); $this->jurisdiction = $child; $happened = true; } else { if ($xml->localName == 'display' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new \Gedcomx\Conclusion\PlaceDisplayProperties($xml); $this->displayExtension = $child; $happened = true; } } } } } } } } return $happened; }
/** * Sets a known child element of Relationship 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 == 'person1' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new ResourceReference($xml); $this->person1 = $child; $happened = true; } else { if ($xml->localName == 'person2' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new ResourceReference($xml); $this->person2 = $child; $happened = true; } else { if ($xml->localName == 'fact' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new Fact($xml); if (!isset($this->facts)) { $this->facts = array(); } array_push($this->facts, $child); $happened = true; } else { if ($xml->localName == 'field' && $xml->namespaceURI == 'http://gedcomx.org/v1/') { $child = new Field($xml); if (!isset($this->fields)) { $this->fields = array(); } array_push($this->fields, $child); $happened = true; } } } } } return $happened; }