コード例 #1
0
ファイル: NamePart.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Initializes this NamePart from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     if (isset($o['value'])) {
         $this->value = $o["value"];
         unset($o['value']);
     }
     if (isset($o['type'])) {
         $this->type = $o["type"];
         unset($o['type']);
     }
     $this->fields = array();
     if (isset($o['fields'])) {
         foreach ($o['fields'] as $i => $x) {
             $this->fields[$i] = new Field($x);
         }
         unset($o['fields']);
     }
     $this->qualifiers = array();
     if (isset($o['qualifiers'])) {
         foreach ($o['qualifiers'] as $i => $x) {
             $this->qualifiers[$i] = new Qualifier($x);
         }
         unset($o['qualifiers']);
     }
     parent::initFromArray($o);
 }
コード例 #2
0
ファイル: Address.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Initializes this Address from an associative array
  *
  * @param array $o
  */
 public function initFromArray($o)
 {
     if (isset($o['city'])) {
         $this->city = $o["city"];
         unset($o['city']);
     }
     if (isset($o['country'])) {
         $this->country = $o["country"];
         unset($o['country']);
     }
     if (isset($o['postalCode'])) {
         $this->postalCode = $o["postalCode"];
         unset($o['postalCode']);
     }
     if (isset($o['stateOrProvince'])) {
         $this->stateOrProvince = $o["stateOrProvince"];
         unset($o['stateOrProvince']);
     }
     if (isset($o['street'])) {
         $this->street = $o["street"];
         unset($o['street']);
     }
     if (isset($o['street2'])) {
         $this->street2 = $o["street2"];
         unset($o['street2']);
     }
     if (isset($o['street3'])) {
         $this->street3 = $o["street3"];
         unset($o['street3']);
     }
     if (isset($o['street4'])) {
         $this->street4 = $o["street4"];
         unset($o['street4']);
     }
     if (isset($o['street5'])) {
         $this->street5 = $o["street5"];
         unset($o['street5']);
     }
     if (isset($o['street6'])) {
         $this->street6 = $o["street6"];
         unset($o['street6']);
     }
     if (isset($o['value'])) {
         $this->value = $o["value"];
         unset($o['value']);
     }
     parent::initFromArray($o);
 }
コード例 #3
0
ファイル: NameForm.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Initializes this NameForm from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     if (isset($o['lang'])) {
         $this->lang = $o["lang"];
         unset($o['lang']);
     }
     if (isset($o['fullText'])) {
         $this->fullText = $o["fullText"];
         unset($o['fullText']);
     }
     $this->parts = array();
     if (isset($o['parts'])) {
         foreach ($o['parts'] as $i => $x) {
             $this->parts[$i] = $x instanceof NamePart ? $x : new NamePart($x);
         }
         unset($o['parts']);
     }
     $this->fields = array();
     if (isset($o['fields'])) {
         foreach ($o['fields'] as $i => $x) {
             $this->fields[$i] = $x instanceof Field ? $x : new Field($x);
         }
         unset($o['fields']);
     }
     parent::initFromArray($o);
 }
コード例 #4
0
 /**
  * Initializes this HypermediaEnabledData from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     $this->links = array();
     if (isset($o['links'])) {
         foreach ($o['links'] as $i => $x) {
             if (!array_key_exists("rel", $x)) {
                 $x["rel"] = $i;
             }
             $this->links[$i] = new Link($x);
         }
         unset($o['links']);
     }
     parent::initFromArray($o);
 }
コード例 #5
0
 /**
  * Initializes this DisplayProperties from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     if (isset($o['ascendancyNumber'])) {
         $this->ascendancyNumber = $o["ascendancyNumber"];
         unset($o["ascendancyNumber"]);
     }
     if (isset($o['birthDate'])) {
         $this->birthDate = $o["birthDate"];
         unset($o["birthDate"]);
     }
     if (isset($o['birthPlace'])) {
         $this->birthPlace = $o["birthPlace"];
         unset($o["birthPlace"]);
     }
     if (isset($o['deathDate'])) {
         $this->deathDate = $o["deathDate"];
         unset($o["deathDate"]);
     }
     if (isset($o['deathPlace'])) {
         $this->deathPlace = $o["deathPlace"];
         unset($o["deathPlace"]);
     }
     if (isset($o['descendancyNumber'])) {
         $this->descendancyNumber = $o["descendancyNumber"];
         unset($o["descendancyNumber"]);
     }
     if (isset($o['gender'])) {
         $this->gender = $o["gender"];
         unset($o["gender"]);
     }
     if (isset($o['lifespan'])) {
         $this->lifespan = $o["lifespan"];
         unset($o["lifespan"]);
     }
     if (isset($o['marriageDate'])) {
         $this->marriageDate = $o["marriageDate"];
         unset($o["marriageDate"]);
     }
     if (isset($o['marriagePlace'])) {
         $this->marriagePlace = $o["marriagePlace"];
         unset($o["marriagePlace"]);
     }
     if (isset($o['name'])) {
         $this->name = $o["name"];
         unset($o["name"]);
     }
     parent::initFromArray($o);
 }
コード例 #6
0
 /**
  * Initializes this PlaceDisplayProperties from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     if (isset($o['fullName'])) {
         $this->fullName = $o["fullName"];
         unset($o['fullName']);
     }
     if (isset($o['name'])) {
         $this->name = $o["name"];
         unset($o['name']);
     }
     if (isset($o['type'])) {
         $this->type = $o["type"];
         unset($o['type']);
     }
     parent::initFromArray($o);
 }
コード例 #7
0
ファイル: PlaceReference.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Initializes this PlaceReference from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     if (isset($o['description'])) {
         $this->descriptionRef = $o["description"];
         unset($o["description"]);
     }
     if (isset($o['original'])) {
         $this->original = $o["original"];
         unset($o["original"]);
     }
     $this->normalizedExtensions = array();
     if (isset($o['normalized'])) {
         foreach ($o['normalized'] as $i => $x) {
             $this->normalizedExtensions[$i] = new TextValue($x);
         }
         unset($o["normalized"]);
     }
     $this->fields = array();
     if (isset($o['fields'])) {
         foreach ($o['fields'] as $i => $x) {
             $this->fields[$i] = new Field($x);
         }
         unset($o["fields"]);
     }
     parent::initFromArray($o);
 }
コード例 #8
0
ファイル: OnlineAccount.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Initializes this OnlineAccount from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     if (isset($o['accountName'])) {
         $this->accountName = $o["accountName"];
         unset($o['accountName']);
     }
     if (isset($o['serviceHomepage'])) {
         $this->serviceHomepage = new ResourceReference($o["serviceHomepage"]);
         unset($o['serviceHomepage']);
     }
     parent::initFromArray($o);
 }