1 | <?php |
||
9 | class Response |
||
10 | { |
||
11 | /** @var ResponseInterface */ |
||
12 | protected $response; |
||
13 | |||
14 | /** @var bool */ |
||
15 | protected $throwErrors; |
||
16 | |||
17 | /** |
||
18 | * @param ResponseInterface $response |
||
19 | * @param bool $throwErrors |
||
20 | * |
||
21 | * @return Response |
||
22 | */ |
||
23 | public static function createFromResponse(ResponseInterface $response, $throwErrors = false) |
||
27 | |||
28 | /** |
||
29 | * @param ResponseInterface $response |
||
30 | * @param bool $throwErrors |
||
31 | */ |
||
32 | public function __construct(ResponseInterface $response, $throwErrors = false) |
||
37 | |||
38 | /** |
||
39 | * @return int |
||
40 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
41 | */ |
||
42 | public function status(): int |
||
46 | |||
47 | /** |
||
48 | * @return bool |
||
49 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
50 | */ |
||
51 | public function isSuccess(): bool |
||
55 | |||
56 | /** |
||
57 | * @return bool |
||
58 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
59 | */ |
||
60 | public function isOk(): bool |
||
64 | |||
65 | /** |
||
66 | * @return bool |
||
67 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
68 | */ |
||
69 | public function isRedirect(): bool |
||
73 | |||
74 | /** |
||
75 | * @return bool |
||
76 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
77 | */ |
||
78 | public function isClientError(): bool |
||
82 | |||
83 | /** |
||
84 | * @return bool |
||
85 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
86 | */ |
||
87 | public function isServerError(): bool |
||
91 | |||
92 | /** |
||
93 | * @return ResponseInterface |
||
94 | */ |
||
95 | public function response() |
||
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | * @throws \Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface |
||
103 | * @throws \Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface |
||
104 | * @throws \Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface |
||
105 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
106 | */ |
||
107 | public function body(): string |
||
111 | |||
112 | /** |
||
113 | * @return string |
||
114 | * @throws \Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface |
||
115 | * @throws \Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface |
||
116 | * @throws \Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface |
||
117 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
118 | */ |
||
119 | public function asString(): string |
||
123 | |||
124 | /** |
||
125 | * @return mixed |
||
126 | * @throws \Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface |
||
127 | * @throws \Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface |
||
128 | * @throws \Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface |
||
129 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
130 | */ |
||
131 | public function asObject() |
||
135 | |||
136 | /** |
||
137 | * @return \Illuminate\Support\Collection<mixed> |
||
|
|||
138 | * |
||
139 | * @throws \Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface |
||
140 | * @throws \Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface |
||
141 | * @throws \Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface |
||
142 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
143 | */ |
||
144 | public function asCollection(): Collection |
||
148 | |||
149 | /** |
||
150 | * @return mixed |
||
151 | * |
||
152 | * @throws \Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface |
||
153 | * @throws \Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface |
||
154 | * @throws \Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface |
||
155 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
156 | */ |
||
157 | public function asArray() |
||
161 | |||
162 | /** |
||
163 | * @return resource |
||
164 | */ |
||
165 | public function toStream() |
||
173 | |||
174 | /** |
||
175 | * @return bool |
||
176 | * |
||
177 | * @throws \Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface |
||
178 | * @throws \Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface |
||
179 | * @throws \Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface |
||
180 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
181 | */ |
||
182 | public function isJson(): bool |
||
186 | |||
187 | /** |
||
188 | * @param string $header |
||
189 | * |
||
190 | * @return mixed|string |
||
191 | * @throws \Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface |
||
192 | * @throws \Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface |
||
193 | * @throws \Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface |
||
194 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
195 | */ |
||
196 | public function header(string $header) |
||
206 | |||
207 | /** |
||
208 | * @param array<mixed> $headers |
||
209 | * |
||
210 | * @return array<String> |
||
211 | */ |
||
212 | protected function normalizeHeaders(array $headers) |
||
218 | |||
219 | /** |
||
220 | * @return array<String> |
||
221 | * |
||
222 | * @throws \Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface |
||
223 | * @throws \Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface |
||
224 | * @throws \Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface |
||
225 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
226 | */ |
||
227 | public function headers(): array |
||
231 | |||
232 | /** |
||
233 | * @return string |
||
234 | */ |
||
235 | public function requestUrl(): string |
||
239 | |||
240 | /** |
||
241 | * @return float |
||
242 | */ |
||
243 | public function executionTime(): float |
||
247 | |||
248 | /** |
||
249 | * @return array|mixed|null |
||
250 | */ |
||
251 | public function customData() |
||
255 | |||
256 | /** |
||
257 | * @return array|mixed|null |
||
258 | */ |
||
259 | public function info() |
||
263 | |||
264 | /** |
||
265 | * @return mixed|string |
||
266 | * |
||
267 | * @throws \Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface |
||
268 | * @throws \Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface |
||
269 | * @throws \Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface |
||
270 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
271 | */ |
||
272 | public function contentType() |
||
276 | |||
277 | /** |
||
278 | * @return mixed|string |
||
279 | * |
||
280 | * @throws \Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface |
||
281 | * @throws \Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface |
||
282 | * @throws \Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface |
||
283 | * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface |
||
284 | */ |
||
285 | public function userAgent() |
||
289 | } |
||
290 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.