matomo
/
app
/
vendor
/
prefixed
/
maxmind
/
web-service-common
/
src
/
Exception
/
HttpException.php
AuthenticationException.php
2 years ago
HttpException.php
2 years ago
InsufficientFundsException.php
2 years ago
InvalidInputException.php
2 years ago
InvalidRequestException.php
2 years ago
IpAddressNotFoundException.php
2 years ago
PermissionRequiredException.php
2 years ago
WebServiceException.php
2 years ago
HttpException.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | declare (strict_types=1); |
| 4 | namespace Matomo\Dependencies\MaxMind\Exception; |
| 5 | |
| 6 | /** |
| 7 | * This class represents an HTTP transport error. |
| 8 | */ |
| 9 | class HttpException extends WebServiceException |
| 10 | { |
| 11 | /** |
| 12 | * The URI queried. |
| 13 | * |
| 14 | * @var string |
| 15 | */ |
| 16 | private $uri; |
| 17 | /** |
| 18 | * @param string $message a message describing the error |
| 19 | * @param int $httpStatus the HTTP status code of the response |
| 20 | * @param string $uri the URI used in the request |
| 21 | * @param \Exception $previous the previous exception, if any |
| 22 | */ |
| 23 | public function __construct(string $message, int $httpStatus, string $uri, \Exception $previous = null) |
| 24 | { |
| 25 | $this->uri = $uri; |
| 26 | parent::__construct($message, $httpStatus, $previous); |
| 27 | } |
| 28 | public function getUri() : string |
| 29 | { |
| 30 | return $this->uri; |
| 31 | } |
| 32 | public function getStatusCode() : int |
| 33 | { |
| 34 | return $this->getCode(); |
| 35 | } |
| 36 | } |
| 37 |