add access-properties
This commit is contained in:
parent
53d684d151
commit
996a501f4f
2 changed files with 58 additions and 0 deletions
|
@ -19,6 +19,12 @@
|
|||
*/
|
||||
class WebUtils
|
||||
{
|
||||
/**
|
||||
* HTTP-statuscode 403: Forbidden
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const HTTP_FORBIDDEN = 403;
|
||||
/**
|
||||
* HTTP-statuscode 404: Not Found
|
||||
*
|
||||
|
@ -40,6 +46,7 @@
|
|||
public static $httpStrings = array(
|
||||
200 => 'OK',
|
||||
304 => 'Not Modified',
|
||||
403 => 'Forbidden',
|
||||
404 => 'Not Found',
|
||||
503 => 'Service Unavailable'
|
||||
);
|
||||
|
|
51
exceptions/AccessDeniedException.inc
Normal file
51
exceptions/AccessDeniedException.inc
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* NRE
|
||||
*
|
||||
* @author coderkun <olli@coderkun.de>
|
||||
* @copyright 2013 coderkun (http://www.coderkun.de)
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link http://www.coderkun.de/projects/nre
|
||||
*/
|
||||
|
||||
namespace nre\exceptions;
|
||||
|
||||
|
||||
/**
|
||||
* Exception: Access denied.
|
||||
*
|
||||
* @author coderkun <olli@coderkun.de>
|
||||
*/
|
||||
class AccessDeniedException extends \nre\core\Exception
|
||||
{
|
||||
/**
|
||||
* Error code
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const CODE = 85;
|
||||
/**
|
||||
* Error message
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const MESSAGE = 'access denied';
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Consturct a new exception.
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
self::MESSAGE,
|
||||
self::CODE
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Reference in a new issue