diff --git a/src/HttpExceptions.php b/src/HttpExceptions.php deleted file mode 100644 index 6bee1f9..0000000 --- a/src/HttpExceptions.php +++ /dev/null @@ -1,108 +0,0 @@ - - * @copyright Copyright 2015 by PJ Dietz - * @license MIT - */ - -namespace WellRESTed\HttpExceptions; - -use Exception; - -/** - * Base exception for HTTP-related errors. Also represents a 500 Internal Server error. - */ -class HttpException extends Exception -{ - /** @var int HTTP Status Code */ - protected $code = 500; - /** @var string Default description for the error */ - protected $message = "500 Internal Server Error"; -} - -/** - * Represents a 400 Bad Request error. - */ -class BadRequestException extends HttpException -{ - /** @var int HTTP Status Code */ - protected $code = 400; - /** @var string Default description for the error */ - protected $message = "400 Bad Request"; -} - -/** - * Represents a 401 Unauthorization error. - */ -class UnauthorizedException extends HttpException -{ - /** @var int HTTP Status Code */ - protected $code = 401; - /** @var string Default description for the error */ - protected $message = "401 Unauthorized"; -} - -/** - * Represents a 403 Forbidden error. - */ -class ForbiddenException extends HttpException -{ - /** @var int HTTP Status Code */ - protected $code = 403; - /** @var string Default description for the error */ - protected $message = "403 Forbidden"; -} - -/** - * Represents a 404 Not Found error. - */ -class NotFoundException extends HttpException -{ - /** @var int HTTP Status Code */ - protected $code = 404; - /** @var string Default description for the error */ - protected $message = "404 Not Found"; -} - -/** - * Represents a 405 Method Not Allowed error. - */ -class MethodNotAllowedException extends HttpException -{ - /** @var int HTTP Status Code */ - protected $code = 405; - /** @var string Default description for the error */ - protected $message = "405 Method Not Allowed"; -} - -/** - * Represents a 409 Conflict error. - */ -class ConflictException extends HttpException -{ - /** @var int HTTP Status Code */ - protected $code = 409; - /** @var string Default description for the error */ - protected $message = "409 Conflict"; -} - -/** - * Represents a 410 Gone error. - */ -class GoneException extends HttpException -{ - /** @var int HTTP Status Code */ - protected $code = 410; - /** @var string Default description for the error */ - protected $message = "410 Gone"; -}