1 | <?php |
||
12 | class TransportCollector implements TransportInterface |
||
13 | { |
||
14 | /** |
||
15 | * The inner service. |
||
16 | * |
||
17 | * @var TransportInterface |
||
18 | */ |
||
19 | protected $service; |
||
20 | |||
21 | /** |
||
22 | * The stopwatch. |
||
23 | * |
||
24 | * @var Stopwatch |
||
25 | */ |
||
26 | protected $stopwatch; |
||
27 | |||
28 | /** |
||
29 | * The made requests. |
||
30 | * |
||
31 | * @var array |
||
32 | */ |
||
33 | protected $requests = array(); |
||
34 | |||
35 | /** |
||
36 | * Constructor. |
||
37 | * |
||
38 | * @param TransportInterface $service The inner transport. |
||
39 | * @param Stopwatch $stopwatch The stopwatch. |
||
40 | */ |
||
41 | public function __construct(TransportInterface $service, Stopwatch $stopwatch) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function setCredentials(ApiCredentials $credentials) |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function getCredentials() |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function sendRequest($body) |
||
85 | |||
86 | /** |
||
87 | * Get the requests. |
||
88 | * |
||
89 | * @return array |
||
90 | */ |
||
91 | public function getRequests() |
||
95 | } |
||
96 |