Controller.php
41 * | _out_ `success` | Boolean whether the action completed successfully or not (depends on existence of error messages)
90 * Initialize the Controller with request/response data. Which data is required is defined by the Controller.
91 * The base class method just stores the parameters in a member variable. Specialized Controllers may overide
93 * @attention It lies in its responsibility to fail or do some default action if some data is missing.
94 * @param $request A reference to the Request sent to the Controller. The sender attribute of the Request is the
95 * last controller's name, the context is the current context and the action is the requested one.
96 * All data sent from the last controller are accessible using the Request::getValue method. The request is
98 * @param $response A reference to the Response that will be modified by the Controller. The initial values for
99 * context and action are the same as in the request parameter and are meant to be modified according to the
100 * performed action. The sender attribute of the response is set to the current controller. Initially there
124 * @param $method The name of the method to execute (optional, defaults to 'doExecute' if not given)
146 throw new IllegalArgumentException("The method '".$method."' is not defined in class ".get_class($this));
Response holds the response values that are used as output from Controller instances.
Definition: Response.php:20
Localization defines the interface for storing localized entity instances and retrieving them back...
Definition: Localization.php:32
Controller is the base class of all controllers.
Definition: Controller.php:48
IllegalArgumentException signals an exception in method arguments.
Definition: IllegalArgumentException.php:18
setSender($sender)
Set the name of the sending Controller.
static getInstance($name, $dynamicConfiguration=array())
Definition: ObjectFactory.php:39
Message is used to get localized messages to be used in the user interface.
Definition: Message.php:23
checkLanguageParameter()
Checks the language request parameter and adds an response error, if it is not contained in the Local...
Definition: Controller.php:315
Session is the interface for session implementations and defines access to session variables...
Definition: Session.php:21
Request holds the request values that are used as input to Controller instances.
Definition: Request.php:20
validate()
Check if the data given by initialize() meet the requirements of the Controller.
Definition: Controller.php:116
executeSubAction($action)
Delegate the current request to another action.
Definition: Controller.php:172
PermissionManager implementations are used to handle all authorization requests.
Definition: PermissionManager.php:22
Implementations of Configuration give access to the application configuration.
Definition: Configuration.php:32
ActionMapper implementations are responsible for instantiating and executing Controllers based on the...
Definition: ActionMapper.php:21
static get($code, $data=null)
Factory method for retrieving a predefind error instance.
Definition: ApplicationError.php:120
execute($method=null)
Execute the Controller resulting in its action processed.
Definition: Controller.php:126
__construct(Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration)
Constructor.
Definition: Controller.php:72
initialize(Request $request, Response $response)
Initialize the Controller with request/response data.
Definition: Controller.php:103
PersistenceFacade defines the interface for PersistenceFacade implementations.
Definition: PersistenceFacade.php:23