ForbiddenHttpException.php 690 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Symfony\Component\HttpKernel\Exception;
  3. /*
  4. * This file is part of the Symfony package.
  5. *
  6. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. /**
  12. * ForbiddenHttpException.
  13. *
  14. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  15. */
  16. class ForbiddenHttpException extends HttpException
  17. {
  18. public function __construct($message = '', $code = 0, \Exception $previous)
  19. {
  20. if (!$message) {
  21. $message = 'Forbidden';
  22. }
  23. parent::__construct($message, 403, $previous);
  24. }
  25. }