File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,7 +64,11 @@ class Client
6464 */
6565 public function __construct (ApiToken $ token , $ options = [])
6666 {
67- $ this ->configureOptions (array_replace (['token ' => $ token ], $ options ));
67+ if ($ options instanceof ConfigurationInterface) {
68+ $ options = $ options ->all ();
69+ }
70+
71+ $ this ->configureOptions (array_replace (['token ' => $ token ], (array ) $ options ));
6872 $ this ->constructHttpClient ();
6973 }
7074
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * This file is part of the Shop2Market module created by B-Found IM&S.
4+ *
5+ * For the full copyright and license information, please view the LICENSE
6+ * file that was distributed with this source code.
7+ *
8+ * @package Shop2Market
9+ * @author Michael Roterman <michael@b-found.nl>
10+ * @copyright (c) 2014, B-Found Internet Marketing & Services
11+ * @version 0.0.1
12+ */
13+
14+ namespace Tmdb ;
15+
16+ interface ConfigurationInterface {
17+ function all ();
18+ }
You can’t perform that action at this time.
0 commit comments