PluginProbe
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript / 4.1.17
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript v4.1.17
4.1.19 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.0.30 4.0.29 4.0.28 4.0.27 4.0.26 4.0.24 4.0.25 4.0.23 4.0.22 4.0.21 4.0.19 4.0.18 4.0.17 4.0.16 1.9.3 All 173 releases
searchpro / BerqWP / vendor / guzzlehttp / guzzle / src / Exception / ConnectException.php

ConnectException.php in BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript 4.1.17, at BerqWP/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php

57 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace GuzzleHttp\Exception;
4
5 use Psr\Http\Client\NetworkExceptionInterface;
6 use Psr\Http\Message\RequestInterface;
7
8 /**
9 * Exception thrown when a connection cannot be established.
10 *
11 * Note that no response is present for a ConnectException
12 */
13 class ConnectException extends TransferException implements NetworkExceptionInterface
14 {
15 /**
16 * @var RequestInterface
17 */
18 private $request;
19
20 /**
21 * @var array
22 */
23 private $handlerContext;
24
25 public function __construct(
26 string $message,
27 RequestInterface $request,
28 ?\Throwable $previous = null,
29 array $handlerContext = []
30 ) {
31 parent::__construct($message, 0, $previous);
32 $this->request = $request;
33 $this->handlerContext = $handlerContext;
34 }
35
36 /**
37 * Get the request that caused the exception
38 */
39 public function getRequest(): RequestInterface
40 {
41 return $this->request;
42 }
43
44 /**
45 * Get contextual information about the error from the underlying handler.
46 *
47 * The contents of this array will vary depending on which handler you are
48 * using. It may also be just an empty array. Relying on this data will
49 * couple you to a specific handler, but can give more debug information
50 * when needed.
51 */
52 public function getHandlerContext(): array
53 {
54 return $this->handlerContext;
55 }
56 }
57