[ Index ]

PHP Cross Reference of YOURLS

title

Body

[close]

/includes/vendor/maxmind/web-service-common/src/Exception/ -> HttpException.php (source)

   1  <?php
   2  
   3  declare(strict_types=1);
   4  
   5  namespace MaxMind\Exception;
   6  
   7  /**
   8   *  This class represents an HTTP transport error.
   9   */
  10  class HttpException extends WebServiceException
  11  {
  12      /**
  13       * The URI queried.
  14       *
  15       * @var string
  16       */
  17      private $uri;
  18  
  19      /**
  20       * @param string     $message    a message describing the error
  21       * @param int        $httpStatus the HTTP status code of the response
  22       * @param string     $uri        the URI used in the request
  23       * @param \Exception $previous   the previous exception, if any
  24       */
  25      public function __construct(
  26          string $message,
  27          int $httpStatus,
  28          string $uri,
  29          \Exception $previous = null
  30      ) {
  31          $this->uri = $uri;
  32          parent::__construct($message, $httpStatus, $previous);
  33      }
  34  
  35      public function getUri(): string
  36      {
  37          return $this->uri;
  38      }
  39  
  40      public function getStatusCode(): int
  41      {
  42          return $this->getCode();
  43      }
  44  }


Generated: Thu Sep 19 05:10:04 2024 Cross-referenced by PHPXref 0.7.1