interface ControllerInterface (View source)

Generic interface for controllers

This interface serves as a common contract for all kinds of controllers. That is, in Flow it covers ActionController (dealing with ActionRequest) but also CommandController (dealing with CommandRequest).

Controllers implementing this interface are compatible with the MVC Dispatcher.

Methods

void
processRequest(ActionRequest $request, ActionResponse $response)

Processes a general request. The result can be returned by altering the given response.

Details

void processRequest(ActionRequest $request, ActionResponse $response)

Processes a general request. The result can be returned by altering the given response.

Parameters

ActionRequest $request

The request object

ActionResponse $response

The response, modified by the controller

Return Value

void

Exceptions

UnsupportedRequestTypeException
StopActionException
ForwardException