From 7874484c53859e609719f95f49f25930de9f7bc3 Mon Sep 17 00:00:00 2001 From: PJ Dietz Date: Sun, 10 May 2015 16:50:21 -0400 Subject: [PATCH] Remove HttpExceptions This will become its own package. --- src/HttpExceptions.php | 108 ----------------------------------------- 1 file changed, 108 deletions(-) delete mode 100644 src/HttpExceptions.php 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"; -}