public function MethodNotAllowedHttpException::__construct

Constructor.

Parameters

array $allow An array of allowed methods:

string $message The internal exception message:

Exception $previous The previous exception:

integer $code The internal exception code:

Overrides HttpException::__construct

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php, line 29

Class

MethodNotAllowedHttpException
MethodNotAllowedHttpException.

Namespace

Symfony\Component\HttpKernel\Exception

Code

public function __construct(array $allow, $message = null, \Exception $previous = null, $code = 0) {
  $headers = array(
    'Allow' => strtoupper(implode(', ', $allow)),
  );
  parent::__construct(405, $message, $previous, $headers, $code);
}