Skip to content

Commit 26f33df

Browse files
authored
Merge pull request #39 from Xantios/master
Added a Filter function
2 parents 772b241 + 9f839a6 commit 26f33df

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Moinax/TvDb/Client.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,21 @@ public function getBanners($serieId)
209209
return $banners;
210210
}
211211

212+
/**
213+
* Find banners that match a filter string
214+
* Eg: poster or season
215+
*/
216+
public function getBannersFiltered($serieId,$filter) {
217+
$data = $this->getBanners($serieId);
218+
$banners = array();
219+
foreach($data as $image) {
220+
if($image->type == $filter) {
221+
$banners[] = $image;
222+
}
223+
}
224+
return $banners;
225+
}
226+
212227
/**
213228
* Find all actors related to a serie
214229
*

0 commit comments

Comments
 (0)