File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 2121use Tmdb \Model \Common \GenericCollection ;
2222use Tmdb \Model \Common \SpokenLanguage ;
2323use Tmdb \Model \Common \Translation ;
24+ use Tmdb \Model \Company ;
2425use Tmdb \Model \Person \CastMember ;
2526use Tmdb \Model \Person \CrewMember ;
2627use Tmdb \Model \Common \ExternalIds ;
@@ -227,6 +228,12 @@ public function create(array $data = [])
227228 $ tvShow ->setOriginCountry ($ collection );
228229 }
229230
231+ if (array_key_exists ('production_companies ' , $ data )) {
232+ $ tvShow ->setProductionCompanies (
233+ $ this ->createGenericCollection ($ data ['production_companies ' ], new Company ())
234+ );
235+ }
236+
230237 if (array_key_exists ('created_by ' , $ data ) && $ data ['created_by ' ] !== null ) {
231238 $ collection = new GenericCollection ();
232239 $ factory = new PeopleFactory ($ this ->getHttpClient ());
Original file line number Diff line number Diff line change @@ -200,6 +200,11 @@ class Tv extends AbstractModel
200200 */
201201 protected $ similar ;
202202
203+ /**
204+ * @var GenericCollection
205+ */
206+ protected $ productionCompanies ;
207+
203208 /**
204209 * Properties that are available in the API
205210 *
@@ -883,4 +888,23 @@ public function getSimilar()
883888 {
884889 return $ this ->similar ;
885890 }
891+
892+ /**
893+ * @return GenericCollection
894+ */
895+ public function getProductionCompanies ()
896+ {
897+ return $ this ->productionCompanies ;
898+ }
899+
900+ /**
901+ * @param GenericCollection $productionCompanies
902+ * @return $this
903+ */
904+ public function setProductionCompanies ($ productionCompanies )
905+ {
906+ $ this ->productionCompanies = $ productionCompanies ;
907+
908+ return $ this ;
909+ }
886910}
You can’t perform that action at this time.
0 commit comments