Example #1
0
 public function __construct($object = null)
 {
     parent::__construct($object);
     $this->setEpisodes(function () {
         return array();
     });
     $this->setSeasons(function () {
         return array();
     });
     if ($object instanceof \stdClass) {
         $this->id = $object->tvshowid;
         $this->setEpisodeguide($object->episodeguide);
         $this->setEpisodeCount($object->episode);
         $this->setImdbnumber($object->imdbnumber);
         $this->setRating($object->rating);
         $this->setMpaa($object->mpaa);
         $this->setYear($object->year);
         $this->setVotes($object->votes);
         $this->setPremiered($object->premiered);
         $this->setOriginaltitle($object->originaltitle);
         $casts = array();
         foreach ($object->cast as $cast) {
             $casts[] = new Cast($cast);
         }
         $this->setCast($casts);
         $this->setStudio($object->studio);
         $this->setSorttitle($object->sorttitle);
         $this->setGenre($object->genre);
     }
 }
Example #2
0
 public function __construct($object = null)
 {
     parent::__construct($object);
     if ($object instanceof \stdClass) {
         $this->setDirector($object->director);
         $this->setResume(new Resume($object->resume));
         $this->setRuntime($object->runtime);
         $this->setStreamdetails(new Streams($object->streamdetails));
     }
 }