1 | <?php |
||
8 | class Http implements TransportInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var Client |
||
12 | */ |
||
13 | protected $client; |
||
14 | |||
15 | /** |
||
16 | * @var Adapter\AdapterInterface |
||
17 | */ |
||
18 | protected $adapter; |
||
19 | |||
20 | public function __construct(Client $client) |
||
24 | |||
25 | /* -- Setters */ |
||
26 | |||
27 | /** |
||
28 | * Set the Transport adapter we will use to communicate |
||
29 | * to Twitch. |
||
30 | * |
||
31 | * @param Adapter\AdapterInterface $adapter |
||
32 | */ |
||
33 | public function setAdapter($adapter) |
||
43 | |||
44 | /** |
||
45 | * Returns the Adapter set to communicate to Twitch. |
||
46 | * If none is set we will try to work with Curl. |
||
47 | * |
||
48 | * @return Adapter\AdapterInterface |
||
49 | */ |
||
50 | public function getAdapter() |
||
57 | |||
58 | /* -- Getters -- */ |
||
59 | |||
60 | |||
61 | public function sendRequest(HttpRequest $request) |
||
90 | } |