W3cubDocs

/Symfony 2.7

Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException

class MethodNotAllowedHttpException extends HttpException

MethodNotAllowedHttpException.

Methods

__construct(array $allow, string $message = null, Exception $previous = null, int $code)

Constructor.

integer getStatusCode()

Returns the status code.

from HttpException
array getHeaders()

Returns response headers.

from HttpException

Details

public __construct(array $allow, string $message = null, Exception $previous = null, int $code)

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

public integer getStatusCode()

Returns the status code.

Return Value

integer An HTTP response status code

public array getHeaders()

Returns response headers.

Return Value

array Response headers