Beispiel #1
0
 /**
  * Returns the associative array for this Entry
  *
  * @return array
  */
 public function toArray()
 {
     $a = parent::toArray();
     if ($this->authors) {
         $ab = array();
         foreach ($this->authors as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['authors'] = $ab;
     }
     if ($this->categories) {
         $ab = array();
         foreach ($this->categories as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['categories'] = $ab;
     }
     if ($this->confidence) {
         $a["confidence"] = $this->confidence;
     }
     if ($this->content) {
         $a["content"] = $this->content->toArray();
     }
     if ($this->contributors) {
         $ab = array();
         foreach ($this->contributors as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['contributors'] = $ab;
     }
     if ($this->id) {
         $a["id"] = $this->id;
     }
     if ($this->links) {
         $ab = array();
         foreach ($this->links as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['links'] = $ab;
     }
     if ($this->published) {
         $a["published"] = $this->published;
     }
     if ($this->rights) {
         $a["rights"] = $this->rights;
     }
     if ($this->score) {
         $a["score"] = $this->score;
     }
     if ($this->title) {
         $a["title"] = $this->title;
     }
     if ($this->updated) {
         $a["updated"] = $this->updated;
     }
     return $a;
 }
Beispiel #2
0
 /**
  * Returns the associative array for this Feed
  *
  * @return array
  */
 public function toArray()
 {
     $a = parent::toArray();
     if ($this->authors) {
         $ab = array();
         foreach ($this->authors as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['authors'] = $ab;
     }
     if ($this->contributors) {
         $ab = array();
         foreach ($this->contributors as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['contributors'] = $ab;
     }
     if ($this->generator) {
         $a["generator"] = $this->generator->toArray();
     }
     if ($this->icon) {
         $a["icon"] = $this->icon;
     }
     if ($this->id) {
         $a["id"] = $this->id;
     }
     if ($this->results) {
         $a["results"] = $this->results;
     }
     if ($this->index) {
         $a["index"] = $this->index;
     }
     if ($this->links) {
         $ab = array();
         foreach ($this->links as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['links'] = $ab;
     }
     if ($this->logo) {
         $a["logo"] = $this->logo;
     }
     if ($this->rights) {
         $a["rights"] = $this->rights;
     }
     if ($this->subtitle) {
         $a["subtitle"] = $this->subtitle;
     }
     if ($this->title) {
         $a["title"] = $this->title;
     }
     if ($this->updated) {
         $a["updated"] = $this->updated;
     }
     if ($this->entries) {
         $ab = array();
         foreach ($this->entries as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['entries'] = $ab;
     }
     if ($this->facets) {
         $ab = array();
         foreach ($this->facets as $i => $x) {
             $ab[$i] = $x->toArray();
         }
         $a['facets'] = $ab;
     }
     return $a;
 }