From 2f65004816dd10bba5890ed1b26512c6de0da111 Mon Sep 17 00:00:00 2001 From: Michael Roterman Date: Thu, 10 Apr 2014 18:23:57 +0200 Subject: [PATCH] Adding examples for the remaining two filters. --- examples/global_adult_filter.php | 19 +++++++++++++++++++ examples/global_language_filter.php | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 examples/global_adult_filter.php create mode 100644 examples/global_language_filter.php diff --git a/examples/global_adult_filter.php b/examples/global_adult_filter.php new file mode 100644 index 00000000..a9ca67ab --- /dev/null +++ b/examples/global_adult_filter.php @@ -0,0 +1,19 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +require_once '../vendor/autoload.php'; +require_once '../apikey.php'; +$token = new \Tmdb\ApiToken(TMDB_API_KEY); +$client = new \Tmdb\Client($token); + +$plugin = new \Tmdb\HttpClient\Plugin\AdultFilterPlugin(); // explicitly set this to true to show adult results +$client->getHttpClient()->addSubscriber($plugin); diff --git a/examples/global_language_filter.php b/examples/global_language_filter.php new file mode 100644 index 00000000..8ec07c49 --- /dev/null +++ b/examples/global_language_filter.php @@ -0,0 +1,19 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +require_once '../vendor/autoload.php'; +require_once '../apikey.php'; +$token = new \Tmdb\ApiToken(TMDB_API_KEY); +$client = new \Tmdb\Client($token); + +$plugin = new \Tmdb\HttpClient\Plugin\LanguageFilterPlugin('nl'); +$client->getHttpClient()->addSubscriber($plugin);