Add additional HttpExceptions

This commit is contained in:
PJ Dietz 2015-03-04 20:56:56 -05:00
parent 2aadfe74b3
commit 81ce6dae9d
1 changed files with 22 additions and 0 deletions

View File

@ -74,6 +74,17 @@ class NotFoundException extends HttpException
protected $message = "404 Not Found"; 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. * Represents a 409 Conflict error.
*/ */
@ -84,3 +95,14 @@ class ConflictException extends HttpException
/** @var string Default description for the error */ /** @var string Default description for the error */
protected $message = "409 Conflict"; 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";
}