Skip to content

Commit

Permalink
Added a Filter function
Browse files Browse the repository at this point in the history
  • Loading branch information
Xantios committed Oct 24, 2016
1 parent 772b241 commit 9f839a6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Moinax/TvDb/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,21 @@ public function getBanners($serieId)
return $banners;
}

/**
* Find banners that match a filter string
* Eg: poster or season
*/
public function getBannersFiltered($serieId,$filter) {
$data = $this->getBanners($serieId);
$banners = array();
foreach($data as $image) {
if($image->type == $filter) {
$banners[] = $image;
}
}
return $banners;
}

/**
* Find all actors related to a serie
*
Expand Down

0 comments on commit 9f839a6

Please sign in to comment.