class MethodNotAllowedException

The resource was found but the request method is not allowed.

This exception should trigger an HTTP 405 response in your application code.

@author Kris Wallsmith <kris@symfony.com>

@api

Hierarchy

Expanded class hierarchy of MethodNotAllowedException

16 files declare their use of MethodNotAllowedException
ApacheUrlMatcher.php in drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php
ChainMatcher.php in drupal/core/lib/Drupal/Core/Routing/ChainMatcher.php
Definition of Drupal\Core\Routing\ChainMatcher.
ChainMatcherTest.php in drupal/core/modules/system/lib/Drupal/system/Tests/Routing/ChainMatcherTest.php
Definition of Drupal\system\Tests\Routing\ChainMatcherTest.
FirstEntryFinalMatcherTest.php in drupal/core/modules/system/lib/Drupal/system/Tests/Routing/FirstEntryFinalMatcherTest.php
Definition of Drupal\system\Tests\Routing\NestedMatcherTest.
HttpMethodMatcher.php in drupal/core/lib/Drupal/Core/Routing/HttpMethodMatcher.php
Definition of Drupal\Core\Routing\HttpMethodMatcher.

... See full list

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Exception/MethodNotAllowedException.php, line 23

Namespace

Symfony\Component\Routing\Exception
View source
class MethodNotAllowedException extends \RuntimeException implements ExceptionInterface {
  protected $allowedMethods;
  public function __construct(array $allowedMethods, $message = null, $code = 0, \Exception $previous = null) {
    $this->allowedMethods = array_map('strtoupper', $allowedMethods);
    parent::__construct($message, $code, $previous);
  }
  public function getAllowedMethods() {
    return $this->allowedMethods;
  }

}

Members