1 | <?php |
||
26 | class Unexpected extends \UnexpectedValueException implements \Minotaur\Net\Exception |
||
27 | { |
||
28 | /** |
||
29 | * @var array<string,mixed> The cURL response info |
||
30 | */ |
||
31 | private $info; |
||
32 | /** |
||
33 | * @var string the response body, or `null` |
||
34 | */ |
||
35 | private $body; |
||
36 | |||
37 | /** |
||
38 | * @param $body - The response body |
||
39 | * @param $info - The cURL response info |
||
40 | * @param $msg - The message |
||
41 | * @param $code - The code |
||
42 | * @param $previous - Any nested exception |
||
43 | */ |
||
44 | public function __construct(?string $body, iterable $info, string $msg, int $code = 0, \Exception $previous = null) |
||
50 | |||
51 | /** |
||
52 | * Gets the cURL handle info. |
||
53 | * |
||
54 | * @return array<string,mixed> the handle info |
||
55 | */ |
||
56 | public function getInfo(): array |
||
60 | |||
61 | /** |
||
62 | * Gets the response body. |
||
63 | * |
||
64 | * @return string|null the response body |
||
65 | */ |
||
66 | public function getBody(): ?string |
||
70 | } |
||
71 |