Skip to content

Commit

Permalink
[RequestHandler] added the Request Handler component
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Feb 17, 2010
1 parent 1e3e707 commit 0218245
Show file tree
Hide file tree
Showing 9 changed files with 1,360 additions and 0 deletions.
@@ -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.