示例#1
0
 /**
  * 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;
 }
示例#2
0
 /**
  * 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;
 }
示例#3
0
 /**
  * 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;
 }