No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

GoneHttpException.php 1.1KB

12345678910111213141516171819202122232425262728293031323334
  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. * GoneHttpException represents a "Gone" HTTP exception with status code 410
  10. *
  11. * Throw a GoneHttpException when a user requests a resource that no longer exists
  12. * at the requested url. For example, after a record is deleted, future requests
  13. * for that record should return a 410 GoneHttpException instead of a 404
  14. * [[NotFoundHttpException]].
  15. *
  16. * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.11
  17. * @author Dan Schmidt <danschmidt5189@gmail.com>
  18. * @since 2.0
  19. */
  20. class GoneHttpException extends HttpException
  21. {
  22. /**
  23. * Constructor.
  24. * @param string $message error message
  25. * @param integer $code error code
  26. * @param \Exception $previous The previous exception used for the exception chaining.
  27. */
  28. public function __construct($message = null, $code = 0, \Exception $previous = null)
  29. {
  30. parent::__construct(410, $message, $code, $previous);
  31. }
  32. }