Refactored project structure.

This commit is contained in:
Dmitry Khomutov 2018-03-04 18:04:15 +07:00
commit c015d8c58b
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
308 changed files with 39 additions and 47 deletions

View file

@ -0,0 +1,18 @@
<?php
namespace PHPCensor\Exception\HttpException;
use PHPCensor\Exception\HttpException;
class BadRequestException extends HttpException
{
/**
* @var integer
*/
protected $errorCode = 400;
/**
* @var string
*/
protected $statusMessage = 'Bad Request';
}

View file

@ -0,0 +1,18 @@
<?php
namespace PHPCensor\Exception\HttpException;
use PHPCensor\Exception\HttpException;
class ForbiddenException extends HttpException
{
/**
* @var integer
*/
protected $errorCode = 403;
/**
* @var string
*/
protected $statusMessage = 'Forbidden';
}

View file

@ -0,0 +1,18 @@
<?php
namespace PHPCensor\Exception\HttpException;
use PHPCensor\Exception\HttpException;
class NotAuthorizedException extends HttpException
{
/**
* @var integer
*/
protected $errorCode = 401;
/**
* @var string
*/
protected $statusMessage = 'Not Authorized';
}

View file

@ -0,0 +1,18 @@
<?php
namespace PHPCensor\Exception\HttpException;
use PHPCensor\Exception\HttpException;
class NotFoundException extends HttpException
{
/**
* @var integer
*/
protected $errorCode = 404;
/**
* @var string
*/
protected $statusMessage = 'Not Found';
}

View file

@ -0,0 +1,9 @@
<?php
namespace PHPCensor\Exception\HttpException;
use PHPCensor\Exception\HttpException;
class ServerErrorException extends HttpException
{
}

View file

@ -0,0 +1,18 @@
<?php
namespace PHPCensor\Exception\HttpException;
use PHPCensor\Exception\HttpException;
class ValidationException extends HttpException
{
/**
* @var integer
*/
protected $errorCode = 400;
/**
* @var string
*/
protected $statusMessage = 'Bad Request';
}