Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

MethodNotAllowedHttpException.php 779B

12345678910111213141516171819202122232425262728
  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. * MethodNotAllowedHttpException represents a "Method Not Allowed" HTTP exception with status code 405.
  10. *
  11. * @author Qiang Xue <qiang.xue@gmail.com>
  12. * @since 2.0
  13. */
  14. class MethodNotAllowedHttpException extends HttpException
  15. {
  16. /**
  17. * Constructor.
  18. * @param string $message error message
  19. * @param integer $code error code
  20. * @param \Exception $previous The previous exception used for the exception chaining.
  21. */
  22. public function __construct($message = null, $code = 0, \Exception $previous = null)
  23. {
  24. parent::__construct(405, $message, $code, $previous);
  25. }
  26. }