1 | <?php |
||
28 | class ConnectFailedEvent extends Event |
||
29 | { |
||
30 | /** |
||
31 | * Event name |
||
32 | * |
||
33 | * @const string |
||
34 | */ |
||
35 | public const NAME = 'veslo.app.event.http.client.connect_failed'; |
||
36 | |||
37 | /** |
||
38 | * The HTTP Client that failed to send a request |
||
39 | * |
||
40 | * @var HttpClientInterface |
||
41 | */ |
||
42 | private $client; |
||
43 | |||
44 | /** |
||
45 | * Connect exception to analyse |
||
46 | * |
||
47 | * @var ConnectException |
||
48 | */ |
||
49 | private $connectException; |
||
50 | |||
51 | /** |
||
52 | * ConnectFailedEvent constructor. |
||
53 | * |
||
54 | * @param HttpClientInterface $client The HTTP Client that failed to send a request |
||
55 | * @param ConnectException $connectException Connect exception to analyse |
||
56 | */ |
||
57 | public function __construct(HttpClientInterface $client, ConnectException $connectException) |
||
62 | |||
63 | /** |
||
64 | * Returns the HTTP Client that failed to send a request |
||
65 | * |
||
66 | * @return HttpClientInterface |
||
67 | */ |
||
68 | public function getClient(): HttpClientInterface |
||
72 | |||
73 | /** |
||
74 | * Returns a connect exception to analyse |
||
75 | * |
||
76 | * @return ConnectException |
||
77 | */ |
||
78 | public function getConnectException(): ConnectException |
||
82 | } |
||
83 |