![]() |
![]() |

Public Member Functions | |
| Controller (&$delegate) | |
| initialize (&$request, &$response) | |
| validate () | |
| hasView () | |
| execute () | |
| executeKernel () | |
| getErrorMsg () | |
| setErrorMsg ($msg) | |
| appendErrorMsg ($msg) | |
| & | getData () |
| & | getView () |
| & | getDelegate () |
| getViewTemplate ($controller, $context, $action) | |
| getCacheId () | |
| assignViewDefaults (&$view) | |
Data Fields | |
| $_request = null | |
| $_response = null | |
| $_data = array() | |
| $_errorMsg = '' | |
| $_view = null | |
| $_delegate = null | |
wCMF - wemove Content Management Framework Copyright (C) 2005-2009 wemove digital solutions GmbH
Licensed under the terms of any of the following licenses at your choice:
See the license.txt file distributed with this work for additional information.
Error Handling:
| [out] | sid | The session id |
| [out] | errorMsg | Any message set with setErrorMsg or appendErrorMsg, optional |
| [out] | success | True, if errorMsg is empty or does not exist, False else |
Definition at line 51 of file class.Controller.php.
| Controller | ( | &$ | delegate | ) |
Constructor.
| delegate | A ControllerDelegate instance, if one is defined in the configuration (optional, default null does not work in PHP4). |
Definition at line 65 of file class.Controller.php.
| initialize | ( | &$ | request, | |
| &$ | response | |||
| ) |
Initialize the Controller with request/response data. Which data is required is defined by the Controller. The base class method just stores the parameters in a member variable. Specialized Controllers may overide this behaviour for further initialization.
| request | A reference to the Request sent to the Controller. The sender attribute of the Request is the last controller's name, the context is the current context and the action is the requested one. All data sent from the last controller are accessible using the Request::getValue method. The request is supposed to be read-only. It will not be used any more after beeing passed to the controller. | |
| response | A reference to the Response that will be modified by the Controller. The initial values for context and action are the same as in the request parameter and are meant to be modified according to the performed action. The sender attribute of the response is set to the current controller. Initially there are no data stored in the response. |
Reimplemented in AdminController, BackupController, ConfigController, MySQLBackupController, PrincipalController, BatchController, DisplayController, LoginController, LongTaskController, NodeListController, PageExportController, PagingController, ResourceListController, SearchController, UserController, and XMLExportController.
Definition at line 83 of file class.Controller.php.
References appendErrorMsg().
Referenced by SearchController::initialize().

| validate | ( | ) |
Check if the data given by initialize() meet the requirements of the Controller. Subclasses will override this method to validate against their special requirements.
Reimplemented in AdminController, BackupController, ConfigController, EditRightsController, MySQLBackupController, PrincipalController, AssociateController, ChildrenListController, ConcurrencyController, CopyController, LoginController, MultipleActionController, NodeListController, and SortController.
Definition at line 100 of file class.Controller.php.
Referenced by execute().
| hasView | ( | ) |
Check if the Controller has a view. Subclasses must implement this method.
Reimplemented in AdminController, ConfigController, EditRightsController, PrincipalController, AssociateController, AsyncPagingController, ConcurrencyController, CopyController, DeleteController, DisplayController, ExitController, FailureController, InsertController, ListboxController, LoginController, LongTaskController, MultipleActionController, PagingController, ResourceListController, SaveController, SearchController, SOAPController, SortController, TerminateController, TreeViewController, UserController, and ViewController.
Definition at line 112 of file class.Controller.php.
References WCMFException::throwEx().
Referenced by execute().

| execute | ( | ) |
Execute the Controller resulting in its Action processed and/or its View beeing displayed.
Definition at line 122 of file class.Controller.php.
References assignViewDefaults(), Log::debug(), executeKernel(), Message::get(), getErrorMsg(), ObjectFactory::getInstance(), SessionData::getInstance(), hasView(), Log::isDebugEnabled(), Formatter::serialize(), WCMFException::throwEx(), and validate().

| executeKernel | ( | ) |
Do the work in execute(): Load and process model and maybe asign data to view. Subclasses process their Action and assign the Model to the view.
Reimplemented in AdminController, ConfigController, EditRightsController, PrincipalController, AssociateController, AsyncPagingController, ChildrenListController, ConcurrencyController, CopyController, DeleteController, DisplayController, ExitController, FailureController, InsertController, ListboxController, LoginController, LongTaskController, MultipleActionController, NodeListController, PageExportController, PagingController, ResourceListController, ResourceTreeController, SaveController, SearchController, SOAPController, SortController, TerminateController, TreeViewController, UserController, and ViewController.
Definition at line 196 of file class.Controller.php.
References WCMFException::throwEx().
Referenced by execute().

| getErrorMsg | ( | ) |
Get a detailed description of the last error.
Definition at line 204 of file class.Controller.php.
Referenced by execute(), and LoginController::executeKernel().
| setErrorMsg | ( | $ | msg | ) |
Set a detailed description of the last error.
| msg | The error message. |
Definition at line 212 of file class.Controller.php.
Referenced by LoginController::executeKernel(), DisplayController::executeKernel(), AssociateController::executeKernel(), TreeViewController::getRootOIDs(), BackupController::restoreFiles(), SortController::validate(), NodeListController::validate(), MultipleActionController::validate(), LoginController::validate(), CopyController::validate(), ConcurrencyController::validate(), ChildrenListController::validate(), AssociateController::validate(), PrincipalController::validate(), MySQLBackupController::validate(), EditRightsController::validate(), ConfigController::validate(), BackupController::validate(), and AdminController::validate().
| appendErrorMsg | ( | $ | msg | ) |
Append a detailed description of the last error to the existing errors.
| msg | The error message. |
Definition at line 220 of file class.Controller.php.
Referenced by SaveController::checkFile(), SaveController::executeKernel(), ResourceListController::executeKernel(), InsertController::executeKernel(), DeleteController::executeKernel(), CopyController::executeKernel(), ConcurrencyController::executeKernel(), AssociateController::executeKernel(), ConfigController::executeKernel(), initialize(), and SaveController::saveUploadFile().
| & getData | ( | ) |
Get the controller data.
Definition at line 230 of file class.Controller.php.
| & getView | ( | ) |
Get the controller view.
Definition at line 238 of file class.Controller.php.
Referenced by PageExportController::createOutputView().
| & getDelegate | ( | ) |
Get the controller delegate.
Definition at line 246 of file class.Controller.php.
| getViewTemplate | ( | $ | controller, | |
| $ | context, | |||
| $ | action | |||
| ) |
Get the template filename for the view from the configfile.
| controller | The name of the controller | |
| context | The name of the context | |
| action | The name of the action |
Definition at line 258 of file class.Controller.php.
References Log::debug(), WCMFInifileParser::getInstance(), Log::isDebugEnabled(), and WCMFException::throwEx().

| getCacheId | ( | ) |
Get the id which should be used when caching the controllers view. This method will only be called, if the configuration entry smarty.caching is set to 1. The default implementation returns null. Subclasses should return an id that is unique to each different content of the same view.
Definition at line 278 of file class.Controller.php.
| assignViewDefaults | ( | &$ | view | ) |
Assign default variables to the view. This method is called after Controller execution. This method may be used by derived controller classes for convenient View setup.
| view | A reference to the View to assign the variables to |
Definition at line 288 of file class.Controller.php.
References Obfuscator::getInstance(), RightsManager::getInstance(), and InifileParser::getInstance().
Referenced by PageExportController::createOutputView(), and execute().

| $_request = null |
Definition at line 53 of file class.Controller.php.
| $_response = null |
Definition at line 54 of file class.Controller.php.
| $_data = array() |
Definition at line 56 of file class.Controller.php.
| $_errorMsg = '' |
Definition at line 57 of file class.Controller.php.
| $_view = null |
Definition at line 58 of file class.Controller.php.
| $_delegate = null |
Definition at line 59 of file class.Controller.php.
|
This page generated via doxygen 1.5.8 Mon Mar 30 01:58:43 2009. Copyright © 2009 wemove digital solutions GmbH. |
|