コード例 #1
0
ファイル: NamePart.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Sets a known child element of NamePart 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 == '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 == 'qualifier' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                 $child = new Qualifier($xml);
                 if (!isset($this->qualifiers)) {
                     $this->qualifiers = array();
                 }
                 array_push($this->qualifiers, $child);
                 $happened = true;
             }
         }
     }
     return $happened;
 }
コード例 #2
0
ファイル: Address.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Sets a known child element of Address from an XML reader.
  *
  * @param \XMLReader $xml The reader.
  *
  * @return bool Whether a child element was set.
  */
 protected function setKnownChildElement($xml)
 {
     $happened = parent::setKnownChildElement($xml);
     if ($happened) {
         return true;
     } else {
         if ($xml->localName == 'city' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
             $child = '';
             while ($xml->read() && $xml->hasValue) {
                 $child = $child . $xml->value;
             }
             $this->city = $child;
             $happened = true;
         } else {
             if ($xml->localName == 'country' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                 $child = '';
                 while ($xml->read() && $xml->hasValue) {
                     $child = $child . $xml->value;
                 }
                 $this->country = $child;
                 $happened = true;
             } else {
                 if ($xml->localName == 'postalCode' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                     $child = '';
                     while ($xml->read() && $xml->hasValue) {
                         $child = $child . $xml->value;
                     }
                     $this->postalCode = $child;
                     $happened = true;
                 } else {
                     if ($xml->localName == 'stateOrProvince' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                         $child = '';
                         while ($xml->read() && $xml->hasValue) {
                             $child = $child . $xml->value;
                         }
                         $this->stateOrProvince = $child;
                         $happened = true;
                     } else {
                         if ($xml->localName == 'street' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                             $child = '';
                             while ($xml->read() && $xml->hasValue) {
                                 $child = $child . $xml->value;
                             }
                             $this->street = $child;
                             $happened = true;
                         } else {
                             if ($xml->localName == 'street2' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                                 $child = '';
                                 while ($xml->read() && $xml->hasValue) {
                                     $child = $child . $xml->value;
                                 }
                                 $this->street2 = $child;
                                 $happened = true;
                             } else {
                                 if ($xml->localName == 'street3' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                                     $child = '';
                                     while ($xml->read() && $xml->hasValue) {
                                         $child = $child . $xml->value;
                                     }
                                     $this->street3 = $child;
                                     $happened = true;
                                 } else {
                                     if ($xml->localName == 'street4' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                                         $child = '';
                                         while ($xml->read() && $xml->hasValue) {
                                             $child = $child . $xml->value;
                                         }
                                         $this->street4 = $child;
                                         $happened = true;
                                     } else {
                                         if ($xml->localName == 'street5' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                                             $child = '';
                                             while ($xml->read() && $xml->hasValue) {
                                                 $child = $child . $xml->value;
                                             }
                                             $this->street5 = $child;
                                             $happened = true;
                                         } else {
                                             if ($xml->localName == 'street6' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                                                 $child = '';
                                                 while ($xml->read() && $xml->hasValue) {
                                                     $child = $child . $xml->value;
                                                 }
                                                 $this->street6 = $child;
                                                 $happened = true;
                                             } else {
                                                 if ($xml->localName == 'value' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                                                     $child = '';
                                                     while ($xml->read() && $xml->hasValue) {
                                                         $child = $child . $xml->value;
                                                     }
                                                     $this->value = $child;
                                                     $happened = true;
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return $happened;
 }
コード例 #3
0
ファイル: NameForm.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Sets a known child element of NameForm 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 == 'fullText' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
             $child = '';
             while ($xml->read() && $xml->hasValue) {
                 $child = $child . $xml->value;
             }
             $this->fullText = $child;
             $happened = true;
         } else {
             if ($xml->localName == 'part' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                 $child = new \Gedcomx\Conclusion\NamePart($xml);
                 if (!isset($this->parts)) {
                     $this->parts = array();
                 }
                 array_push($this->parts, $child);
                 $happened = true;
             } else {
                 if ($xml->localName == 'field' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                     $child = new \Gedcomx\Records\Field($xml);
                     if (!isset($this->fields)) {
                         $this->fields = array();
                     }
                     array_push($this->fields, $child);
                     $happened = true;
                 }
             }
         }
     }
     return $happened;
 }
コード例 #4
0
 /**
  * Sets a known child element of HypermediaEnabledData 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 == 'link' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
             $child = new Link($xml);
             if (!isset($this->links)) {
                 $this->links = array();
             }
             array_push($this->links, $child);
             $happened = true;
         }
     }
     return $happened;
 }
コード例 #5
0
 /**
  * Sets a known child element of DisplayProperties 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 == 'ascendancyNumber' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
             $child = '';
             while ($xml->read() && $xml->hasValue) {
                 $child = $child . $xml->value;
             }
             $this->ascendancyNumber = $child;
             $happened = true;
         } else {
             if ($xml->localName == 'birthDate' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                 $child = '';
                 while ($xml->read() && $xml->hasValue) {
                     $child = $child . $xml->value;
                 }
                 $this->birthDate = $child;
                 $happened = true;
             } else {
                 if ($xml->localName == 'birthPlace' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                     $child = '';
                     while ($xml->read() && $xml->hasValue) {
                         $child = $child . $xml->value;
                     }
                     $this->birthPlace = $child;
                     $happened = true;
                 } else {
                     if ($xml->localName == 'deathDate' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                         $child = '';
                         while ($xml->read() && $xml->hasValue) {
                             $child = $child . $xml->value;
                         }
                         $this->deathDate = $child;
                         $happened = true;
                     } else {
                         if ($xml->localName == 'deathPlace' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                             $child = '';
                             while ($xml->read() && $xml->hasValue) {
                                 $child = $child . $xml->value;
                             }
                             $this->deathPlace = $child;
                             $happened = true;
                         } else {
                             if ($xml->localName == 'descendancyNumber' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                                 $child = '';
                                 while ($xml->read() && $xml->hasValue) {
                                     $child = $child . $xml->value;
                                 }
                                 $this->descendancyNumber = $child;
                                 $happened = true;
                             } else {
                                 if ($xml->localName == 'gender' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                                     $child = '';
                                     while ($xml->read() && $xml->hasValue) {
                                         $child = $child . $xml->value;
                                     }
                                     $this->gender = $child;
                                     $happened = true;
                                 } else {
                                     if ($xml->localName == 'lifespan' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                                         $child = '';
                                         while ($xml->read() && $xml->hasValue) {
                                             $child = $child . $xml->value;
                                         }
                                         $this->lifespan = $child;
                                         $happened = true;
                                     } else {
                                         if ($xml->localName == 'marriageDate' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                                             $child = '';
                                             while ($xml->read() && $xml->hasValue) {
                                                 $child = $child . $xml->value;
                                             }
                                             $this->marriageDate = $child;
                                             $happened = true;
                                         } else {
                                             if ($xml->localName == 'marriagePlace' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                                                 $child = '';
                                                 while ($xml->read() && $xml->hasValue) {
                                                     $child = $child . $xml->value;
                                                 }
                                                 $this->marriagePlace = $child;
                                                 $happened = true;
                                             } else {
                                                 if ($xml->localName == 'name' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                                                     $child = '';
                                                     while ($xml->read() && $xml->hasValue) {
                                                         $child = $child . $xml->value;
                                                     }
                                                     $this->name = $child;
                                                     $happened = true;
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return $happened;
 }
コード例 #6
0
 /**
  * Sets a known child element of PlaceDisplayProperties 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 == 'fullName' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
             $child = '';
             while ($xml->read() && $xml->hasValue) {
                 $child = $child . $xml->value;
             }
             $this->fullName = $child;
             $happened = true;
         } else {
             if ($xml->localName == 'name' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                 $child = '';
                 while ($xml->read() && $xml->hasValue) {
                     $child = $child . $xml->value;
                 }
                 $this->name = $child;
                 $happened = true;
             } else {
                 if ($xml->localName == 'type' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                     $child = '';
                     while ($xml->read() && $xml->hasValue) {
                         $child = $child . $xml->value;
                     }
                     $this->type = $child;
                     $happened = true;
                 }
             }
         }
     }
     return $happened;
 }
コード例 #7
0
ファイル: PlaceReference.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Sets a known child element of PlaceReference 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 == 'original' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
             $child = '';
             while ($xml->read() && $xml->hasValue) {
                 $child = $child . $xml->value;
             }
             $this->original = $child;
             $happened = true;
         } else {
             if ($xml->localName == 'normalized' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                 $child = new TextValue($xml);
                 if (!isset($this->normalizedExtensions)) {
                     $this->normalizedExtensions = array();
                 }
                 array_push($this->normalizedExtensions, $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;
 }
コード例 #8
0
ファイル: OnlineAccount.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Sets a known child element of OnlineAccount 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 == 'accountName' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
             $child = '';
             while ($xml->read() && $xml->hasValue) {
                 $child = $child . $xml->value;
             }
             $this->accountName = $child;
             $happened = true;
         } else {
             if ($xml->localName == 'serviceHomepage' && $xml->namespaceURI == 'http://gedcomx.org/v1/') {
                 $child = new ResourceReference($xml);
                 $this->serviceHomepage = $child;
                 $happened = true;
             }
         }
     }
     return $happened;
 }