class MethodNotAllowedException extends RoutingException (View source)

Exception that is thrown when the path matches, but the HTTP request method does not match any known route.

Methods

__construct(string $message, array $allowedMethods)

MethodNotAllowedException constructor.

array
getAllowedMethods()

Returns a list of allowed HTTP request methods.

Details

__construct(string $message, array $allowedMethods)

MethodNotAllowedException constructor.

Parameters

string $message The exception message
array $allowedMethods List of HTTP request methods that are allowed

array getAllowedMethods()

Returns a list of allowed HTTP request methods.

Return Value

array List of allowed HTTP request methods