コード例 #1
0
 /**
  * Returns the associative array for this PlaceDescription
  *
  * @return array
  */
 public function toArray()
 {
     $a = parent::toArray();
     if ($this->type) {
         $a["type"] = $this->type;
     }
     if ($this->names) {
         $ab = array();
         foreach ($this->names as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['names'] = $ab;
     }
     if ($this->temporalDescription) {
         $a["temporalDescription"] = $this->temporalDescription->toArray();
     }
     if ($this->latitude) {
         $a["latitude"] = $this->latitude;
     }
     if ($this->longitude) {
         $a["longitude"] = $this->longitude;
     }
     if ($this->spatialDescription) {
         $a["spatialDescription"] = $this->spatialDescription->toArray();
     }
     if ($this->jurisdiction) {
         $a["jurisdiction"] = $this->jurisdiction->toArray();
     }
     if ($this->displayExtension) {
         $a["display"] = $this->displayExtension->toArray();
     }
     return $a;
 }
コード例 #2
0
ファイル: Fact.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Returns the associative array for this Fact
  *
  * @return array
  */
 public function toArray()
 {
     $a = parent::toArray();
     if ($this->primary) {
         $a["primary"] = $this->primary;
     }
     if ($this->type) {
         $a["type"] = $this->type;
     }
     if ($this->date) {
         $a["date"] = $this->date->toArray();
     }
     if ($this->place) {
         $a["place"] = $this->place->toArray();
     }
     if ($this->value) {
         $a["value"] = $this->value;
     }
     if ($this->qualifiers) {
         $ab = array();
         foreach ($this->qualifiers as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['qualifiers'] = $ab;
     }
     if ($this->fields) {
         $ab = array();
         foreach ($this->fields as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['fields'] = $ab;
     }
     return $a;
 }
コード例 #3
0
ファイル: Coverage.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Returns the associative array for this Coverage
  *
  * @return array
  */
 public function toArray()
 {
     $a = parent::toArray();
     if ($this->recordType) {
         $a["recordType"] = $this->recordType;
     }
     if ($this->spatial) {
         $a["spatial"] = $this->spatial->toArray();
     }
     if ($this->temporal) {
         $a["temporal"] = $this->temporal->toArray();
     }
     return $a;
 }
コード例 #4
0
ファイル: Event.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Returns the associative array for this Event
  *
  * @return array
  */
 public function toArray()
 {
     $a = parent::toArray();
     if ($this->type) {
         $a["type"] = $this->type;
     }
     if ($this->date) {
         $a["date"] = $this->date->toArray();
     }
     if ($this->place) {
         $a["place"] = $this->place->toArray();
     }
     if ($this->roles) {
         $ab = array();
         foreach ($this->roles as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['roles'] = $ab;
     }
     return $a;
 }
コード例 #5
0
ファイル: Name.php プロジェクト: BRGWeb/gedcomx-php
 /**
  * Returns the associative array for this Name
  *
  * @return array
  */
 public function toArray()
 {
     $a = parent::toArray();
     if ($this->type) {
         $a["type"] = $this->type;
     }
     if ($this->preferred) {
         $a["preferred"] = $this->preferred;
     }
     if ($this->date) {
         $a["date"] = $this->date->toArray();
     }
     if ($this->nameForms) {
         $ab = array();
         foreach ($this->nameForms as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['nameForms'] = $ab;
     }
     return $a;
 }