update v 1.0.7.5
This commit is contained in:
10
vendor/maxmind/web-service-common/src/Exception/AuthenticationException.php
vendored
Normal file
10
vendor/maxmind/web-service-common/src/Exception/AuthenticationException.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace MaxMind\Exception;
|
||||
|
||||
/**
|
||||
* This class represents an error authenticating
|
||||
*/
|
||||
class AuthenticationException extends InvalidRequestException
|
||||
{
|
||||
}
|
||||
40
vendor/maxmind/web-service-common/src/Exception/HttpException.php
vendored
Normal file
40
vendor/maxmind/web-service-common/src/Exception/HttpException.php
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace MaxMind\Exception;
|
||||
|
||||
/**
|
||||
* This class represents an HTTP transport error.
|
||||
*/
|
||||
class HttpException extends WebServiceException
|
||||
{
|
||||
/**
|
||||
* The URI queried
|
||||
*/
|
||||
private $uri;
|
||||
|
||||
/**
|
||||
* @param string $message A message describing the error.
|
||||
* @param int $httpStatus The HTTP status code of the response
|
||||
* @param string $uri The URI used in the request.
|
||||
* @param \Exception $previous The previous exception, if any.
|
||||
*/
|
||||
public function __construct(
|
||||
$message,
|
||||
$httpStatus,
|
||||
$uri,
|
||||
\Exception $previous = null
|
||||
) {
|
||||
$this->uri = $uri;
|
||||
parent::__construct($message, $httpStatus, $previous);
|
||||
}
|
||||
|
||||
public function getUri()
|
||||
{
|
||||
return $this->uri;
|
||||
}
|
||||
|
||||
public function getStatusCode()
|
||||
{
|
||||
return $this->getCode();
|
||||
}
|
||||
}
|
||||
10
vendor/maxmind/web-service-common/src/Exception/InsufficientFundsException.php
vendored
Normal file
10
vendor/maxmind/web-service-common/src/Exception/InsufficientFundsException.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace MaxMind\Exception;
|
||||
|
||||
/**
|
||||
* Thrown when the account is out of credits.
|
||||
*/
|
||||
class InsufficientFundsException extends InvalidRequestException
|
||||
{
|
||||
}
|
||||
12
vendor/maxmind/web-service-common/src/Exception/InvalidInputException.php
vendored
Normal file
12
vendor/maxmind/web-service-common/src/Exception/InvalidInputException.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace MaxMind\Exception;
|
||||
|
||||
/**
|
||||
* This class represents an error in creating the request to be sent to the
|
||||
* web service. For example, if the array cannot be encoded as JSON or if there
|
||||
* is a missing or invalid field.
|
||||
*/
|
||||
class InvalidInputException extends WebServiceException
|
||||
{
|
||||
}
|
||||
37
vendor/maxmind/web-service-common/src/Exception/InvalidRequestException.php
vendored
Normal file
37
vendor/maxmind/web-service-common/src/Exception/InvalidRequestException.php
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace MaxMind\Exception;
|
||||
|
||||
/**
|
||||
* Thrown when a MaxMind web service returns an error relating to the request.
|
||||
*/
|
||||
class InvalidRequestException extends HttpException
|
||||
{
|
||||
/**
|
||||
* The code returned by the MaxMind web service
|
||||
*/
|
||||
private $error;
|
||||
|
||||
/**
|
||||
* @param string $message The exception message
|
||||
* @param int $error The error code returned by the MaxMind web service
|
||||
* @param int $httpStatus The HTTP status code of the response
|
||||
* @param string $uri The URI queries
|
||||
* @param \Exception $previous The previous exception, if any.
|
||||
*/
|
||||
public function __construct(
|
||||
$message,
|
||||
$error,
|
||||
$httpStatus,
|
||||
$uri,
|
||||
\Exception $previous = null
|
||||
) {
|
||||
$this->error = $error;
|
||||
parent::__construct($message, $httpStatus, $uri, $previous);
|
||||
}
|
||||
|
||||
public function getErrorCode()
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
}
|
||||
7
vendor/maxmind/web-service-common/src/Exception/IpAddressNotFoundException.php
vendored
Normal file
7
vendor/maxmind/web-service-common/src/Exception/IpAddressNotFoundException.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace MaxMind\Exception;
|
||||
|
||||
class IpAddressNotFoundException extends InvalidRequestException
|
||||
{
|
||||
}
|
||||
10
vendor/maxmind/web-service-common/src/Exception/PermissionRequiredException.php
vendored
Normal file
10
vendor/maxmind/web-service-common/src/Exception/PermissionRequiredException.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace MaxMind\Exception;
|
||||
|
||||
/**
|
||||
* This exception is thrown when the service requires permission to access.
|
||||
*/
|
||||
class PermissionRequiredException extends InvalidRequestException
|
||||
{
|
||||
}
|
||||
10
vendor/maxmind/web-service-common/src/Exception/WebServiceException.php
vendored
Normal file
10
vendor/maxmind/web-service-common/src/Exception/WebServiceException.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace MaxMind\Exception;
|
||||
|
||||
/**
|
||||
* This class represents a generic web service error.
|
||||
*/
|
||||
class WebServiceException extends \Exception
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user