NotFoundHttpException.php 808 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * @link http://www.yiiframework.com/
  4. * @copyright Copyright (c) 2008 Yii Software LLC
  5. * @license http://www.yiiframework.com/license/
  6. */
  7. namespace yii\web;
  8. /**
  9. * NotFoundHttpException represents a "Not Found" HTTP exception with status code 404.
  10. *
  11. * @see https://tools.ietf.org/html/rfc7231#section-6.5.4
  12. * @author Qiang Xue <qiang.xue@gmail.com>
  13. * @since 2.0
  14. */
  15. class NotFoundHttpException extends HttpException
  16. {
  17. /**
  18. * Constructor.
  19. * @param string $message error message
  20. * @param int $code error code
  21. * @param \Exception $previous The previous exception used for the exception chaining.
  22. */
  23. public function __construct($message = null, $code = 0, \Exception $previous = null)
  24. {
  25. parent::__construct(404, $message, $code, $previous);
  26. }
  27. }