Beispiel #1
0
 /**
  * Implements \JsonSerializable interface
  *
  * @return array|mixed
  */
 public function jsonSerialize()
 {
     $array = ['series' => $this->series->export(), 'release' => $this->release->export()];
     if ($this->page_array !== null) {
         $array['pages'] = [];
         foreach ($this->page_array as $page) {
             $array['pages'][] = $page->export();
         }
     }
     return $array;
 }
Beispiel #2
0
 /**
  * Implements \JsonSerializable interface
  *
  * @return array|mixed
  */
 public function jsonSerialize()
 {
     return ['series' => $this->series->export(), 'release' => $this->release->export(), 'page' => $this->page->export()];
 }