interface HttpRequestHandlerInterface implements RequestHandlerInterface (View source)

The interface for a request handler which handles and works with HTTP requests

Methods

void
handleRequest()

Handles a raw request

mixed
canHandleRequest()

Checks if the request handler can handle the current request.

int
getPriority()

Returns the priority - how eager the handler is to actually handle the request. An integer > 0 means "I want to handle this request" where "100" is default. "0" means "I am a fallback solution".

ServerRequestInterface
getHttpRequest() deprecated

Returns the currently processed HTTP request

ResponseInterface
getHttpResponse() deprecated

Returns the HTTP response corresponding to the currently handled request

getComponentContext()

Get the ComponentContext for this request handlers component chain

Details

void handleRequest()

Handles a raw request

Return Value

void

mixed canHandleRequest()

Checks if the request handler can handle the current request.

Return Value

mixed

true or an integer > 0 if it can handle the request, otherwise false or an integer < 0

int getPriority()

Returns the priority - how eager the handler is to actually handle the request. An integer > 0 means "I want to handle this request" where "100" is default. "0" means "I am a fallback solution".

Return Value

int

The priority of the request handler

ServerRequestInterface getHttpRequest() deprecated

deprecated since 6.0 use getComponentContext()->getHttpRequest() instead

Returns the currently processed HTTP request

Return Value

ServerRequestInterface

ResponseInterface getHttpResponse() deprecated

deprecated since 6.0 use getComponentContext()->getHttpResponse() instead

Returns the HTTP response corresponding to the currently handled request

Return Value

ResponseInterface

ComponentContext getComponentContext()

Get the ComponentContext for this request handlers component chain

Return Value

ComponentContext