class HttpMethod (View source)

Provides valid values for the HTTP request method.

Constants

GET

The HTTP GET request method

HEAD

The HTTP HEAD request method

POST

The HTTP POST request method

PUT

The HTTP PUT request method

DELETE

The HTTP DELETE request method

CONNECT

The HTTP CONNECT request method

OPTIONS

The HTTP OPTIONS request method

TRACE

The HTTP TRACE request method

PATCH

The HTTP PATCH request method

Methods

static bool
isValid(string $method)

Tells if the given string is a valid HTTP request method.

static array
getAll()

Returns list of all valid HTTP request methods.

Details

static bool isValid(string $method)

Tells if the given string is a valid HTTP request method.

Parameters

string $method The string to test

Return Value

bool True if it is a valid HTTP request method, false if not

static array getAll()

Returns list of all valid HTTP request methods.

Return Value

array List of all valid HTTP request methods