1 | <?php |
||
26 | class Unreachable extends \RuntimeException implements \Minotaur\Net\Exception |
||
27 | { |
||
28 | private const ERRORS = [ |
||
29 | CURLE_OPERATION_TIMEOUTED, CURLE_COULDNT_RESOLVE_HOST, |
||
30 | CURLE_COULDNT_RESOLVE_PROXY, CURLE_COULDNT_CONNECT, CURLE_SSL_CONNECT_ERROR, |
||
31 | CURLE_SSL_PEER_CERTIFICATE, CURLE_SSL_CACERT, CURLE_SEND_ERROR, |
||
32 | CURLE_RECV_ERROR, CURLE_GOT_NOTHING |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * @var array<string,mixed> The cURL handle info |
||
37 | */ |
||
38 | private $info; |
||
39 | |||
40 | /** |
||
41 | * @param iterable<string,mixed> $info The cURL handle info |
||
|
|||
42 | * @param $msg - The message |
||
43 | * @param $code - The code |
||
44 | * @param $previous - Any nested exception |
||
45 | */ |
||
46 | public function __construct(iterable $info, string $msg, int $code = 0, \Exception $previous = null) |
||
51 | |||
52 | /** |
||
53 | * Gets the cURL handle info. |
||
54 | * |
||
55 | * @return array<string,mixed> the handle info |
||
56 | */ |
||
57 | public function getInfo(): array |
||
61 | |||
62 | /** |
||
63 | * Determines whether the code returned from cURL is one this class supports. |
||
64 | * |
||
65 | * @param int $code The code |
||
66 | * @return bool whether this class should be used |
||
67 | */ |
||
68 | public static function isUsable(int $code) : bool |
||
72 | } |
||
73 |
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.