interface RequestFilter

deprecated 4.0.0:5.0.0 Use HTTPMiddleware instead

A request filter is an object that's executed before and after a request occurs. By returning 'false' from the preRequest method, request execution will be stopped from continuing

Methods

boolean
preRequest(HTTPRequest $request)

Filter executed before a request processes

bool
postRequest(HTTPRequest $request, HTTPResponse $response)

Filter executed AFTER a request

Details

at line 22
boolean preRequest(HTTPRequest $request)

Filter executed before a request processes

Parameters

HTTPRequest $request Request container object

Return Value

boolean Whether to continue processing other filters. Null or true will continue processing (optional)

at line 31
bool postRequest(HTTPRequest $request, HTTPResponse $response)

Filter executed AFTER a request

Parameters

HTTPRequest $request Request container object
HTTPResponse $response

Return Value

bool Whether to continue processing other filters. Null or true will continue processing (optional)