We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddae50d commit 322a2a0Copy full SHA for 322a2a0
1 file changed
lib/Tmdb/Model/Query/Discover/DiscoverTvQuery.php
@@ -15,6 +15,7 @@
15
namespace Tmdb\Model\Query\Discover;
16
17
use DateTime;
18
+use Tmdb\Model\AbstractModel;
19
use Tmdb\Model\Collection\QueryParametersCollection;
20
21
/**
@@ -314,4 +315,19 @@ public function withNetworksAnd(array $networks = [])
314
315
implode(',', $networks)
316
);
317
}
318
+
319
+ /**
320
+ * Extract object id's if an collection was passed on.
321
+ *
322
+ * @param $mixed
323
+ * @return mixed
324
+ */
325
+ protected function normalize($mixed)
326
+ {
327
+ if (is_object($mixed) && $mixed instanceof AbstractModel) {
328
+ return $mixed->getId();
329
+ }
330
331
+ return $mixed;
332
333
0 commit comments