Skip to content
Permalink
Browse files

[RequestHandler] added the Request Handler component

  • Loading branch information...
fabpot committed Feb 17, 2010
1 parent 1e3e707 commit 02182459763073e2f436f83c3ebd4bfaf9f1632f
@@ -0,0 +1,16 @@
<?php
namespace Symfony\Components\RequestHandler\Exception;
class ForbiddenHttpException extends HttpException
{
public function __construct($message = '')
{
if (!$message)
{
$message = 'Forbidden';
}
parent::__construct($message, 403);
}
}
@@ -0,0 +1,8 @@
<?php
namespace Symfony\Components\RequestHandler\Exception;
// by convention, exception code == response status code
class HttpException extends \Exception
{
}
@@ -0,0 +1,16 @@
<?php
namespace Symfony\Components\RequestHandler\Exception;
class NotFoundHttpException extends HttpException
{
public function __construct($message = '')
{
if (!$message)
{
$message = 'Not Found';
}
parent::__construct($message, 404);
}
}
@@ -0,0 +1,16 @@
<?php
namespace Symfony\Components\RequestHandler\Exception;
class UnauthorizedHttpException extends HttpException
{
public function __construct($message = '')
{
if (!$message)
{
$message = 'Unauthorized';
}
parent::__construct($message, 401);
}
}

0 comments on commit 0218245

Please sign in to comment.
You can’t perform that action at this time.