Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MethodNotAllowedHttpException.php

function MethodNotAllowedHttpException::__construct

Parameters

string[] $allow An array of allowed methods:

Overrides HttpException::__construct

2 calls to MethodNotAllowedHttpException::__construct()
CacheableMethodNotAllowedHttpException::__construct in core/lib/Drupal/Core/Http/Exception/CacheableMethodNotAllowedHttpException.php
CacheableMethodNotAllowedHttpException::__construct in core/lib/Drupal/Core/Http/Exception/CacheableMethodNotAllowedHttpException.php
1 method overrides MethodNotAllowedHttpException::__construct()
CacheableMethodNotAllowedHttpException::__construct in core/lib/Drupal/Core/Http/Exception/CacheableMethodNotAllowedHttpException.php

File

vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php, line 22

Class

MethodNotAllowedHttpException
@author Kris Wallsmith <kris@symfony.com>

Namespace

Symfony\Component\HttpKernel\Exception

Code

public function __construct(array $allow, string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = []) {
    $headers['Allow'] = strtoupper(implode(', ', $allow));
    parent::__construct(405, $message, $previous, $headers, $code);
}
RSS feed
Powered by Drupal