Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

34 lines
1.1KB

  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. * NotAcceptableHttpException represents a "Not Acceptable" HTTP exception with status code 406
  10. *
  11. * Use this exception when the client requests a Content-Type that your
  12. * application cannot return. Note that, according to the HTTP 1.1 specification,
  13. * you are not required to respond with this status code in this situation.
  14. *
  15. * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7
  16. * @author Dan Schmidt <danschmidt5189@gmail.com>
  17. * @since 2.0
  18. */
  19. class NotAcceptableHttpException extends HttpException
  20. {
  21. /**
  22. * Constructor.
  23. * @param string $message error message
  24. * @param integer $code error code
  25. * @param \Exception $previous The previous exception used for the exception chaining.
  26. */
  27. public function __construct($message = null, $code = 0, \Exception $previous = null)
  28. {
  29. parent::__construct(406, $message, $code, $previous);
  30. }
  31. }