You are here

public function MethodNotAllowedHttpException::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException::__construct()

Constructor.

Parameters

array $allow An array of allowed methods:

string $message The internal exception message:

\Exception $previous The previous exception:

int $code The internal exception code:

Overrides HttpException::__construct

File

vendor/symfony/http-kernel/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);
}