1 | <?php |
||
25 | class BuzzAdapter implements AdapterInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var Browser |
||
29 | */ |
||
30 | protected $browser; |
||
31 | |||
32 | /** |
||
33 | * @param string $token |
||
34 | * @param Browser|null $browser |
||
35 | * @param MiddlewareInterface|null $middleware |
||
36 | */ |
||
37 | public function __construct($token, Browser $browser = null, MiddlewareInterface $middleware = null) |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public function get($url) |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function delete($url) |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function put($url, $content = '') |
||
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | public function post($url, $content = '') |
||
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | public function getLatestResponseHeaders() |
||
118 | |||
119 | /** |
||
120 | * @param Response $response |
||
121 | * |
||
122 | * @throws HttpException |
||
123 | */ |
||
124 | protected function handleResponse(Response $response) |
||
132 | |||
133 | /** |
||
134 | * @param Response $response |
||
135 | * |
||
136 | * @throws HttpException |
||
137 | */ |
||
138 | protected function handleError(Response $response) |
||
147 | } |
||
148 |