interface RequestFilter (View source)

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

public
bool
preRequest(SS_HTTPRequest $request, Session $session, DataModel $model)

Filter executed before a request processes

public
bool
postRequest(SS_HTTPRequest $request, SS_HTTPResponse $response, DataModel $model)

Filter executed AFTER a request

Details

bool preRequest(SS_HTTPRequest $request, Session $session, DataModel $model)

Filter executed before a request processes

Parameters

SS_HTTPRequest $request

Request container object

Session $session

Request session

DataModel $model

Current DataModel

Return Value

bool

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

bool postRequest(SS_HTTPRequest $request, SS_HTTPResponse $response, DataModel $model)

Filter executed AFTER a request

Parameters

SS_HTTPRequest $request

Request container object

SS_HTTPResponse $response

Response output object

DataModel $model

Current DataModel

Return Value

bool

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