Пример #1
0
 public function __construct($object = null)
 {
     parent::__construct($object);
     $this->setTvshow(null);
     $this->setSeason(null);
     if ($object instanceof \stdClass) {
         $this->id = $object->episodeid;
         $this->setRaiting($object->rating);
         $this->setTvshowid($object->tvshowid);
         $this->setVotes($object->votes);
         $this->setEpisodeNumber($object->episode);
         $this->setProductioncode($object->productioncode);
         $this->setSeasonNumber($object->season);
         $this->setWriter($object->writer);
         $this->setOriginaltitle($object->originaltitle);
         $this->setCast($object->cast);
         $this->setFirstaired($object->firstaired);
         $this->setShowtitle($object->showtitle);
         $casts = array();
         foreach ($object->cast as $cast) {
             $casts[] = new Cast($cast);
         }
         $this->setCast($casts);
     }
 }
Пример #2
0
 public function __construct($object = null)
 {
     parent::__construct($object);
     $this->setMovieSets(array());
     if ($object instanceof \stdClass) {
         $this->id = $object->movieid;
         $this->setRating($object->rating);
         $this->setMovieSetIds($object->setid);
         $this->setMovieSetNames($object->set);
         $this->setYear($object->year);
         $this->setVotes($object->votes);
         $this->setTagline($object->tagline);
         $this->setWriter($object->writer);
         $this->setPlotoutline($object->plotoutline);
         $this->setSorttitle($object->sorttitle);
         $this->setImdbnummer($object->imdbnumber);
         $this->setStudio($object->studio);
         $this->setShowlink($object->showlink);
         $this->setGenre($object->genre);
         $this->setProductioncode($object->productioncode);
         $this->setCountry($object->country);
         $this->setPremiered($object->premiered);
         $this->setOriginaltitle($object->originaltitle);
         $this->setCast($object->cast);
         $this->setMpaa($object->mpaa);
         $this->setTop250($object->top250);
         $this->setTrailer($object->trailer);
         $casts = array();
         foreach ($object->cast as $cast) {
             $casts[] = new Cast($cast);
         }
         $this->setCast($casts);
     }
 }