Skip to content
dongbeta edited this page Jul 28, 2011 · 1 revision

Controller

The Controller classes in Xoops are instances of Xoops_Zend_Controller_Action. By default, the first segment of a URL path maps to a controller, and the second to an action. For example, given the URL http://framework.zend.com/roadmap/components , the path is /roadmap/components, which will map to the controller roadmap and the action components. If no action is provided, the action index is assumed, and if no controller is provided, the controller index is assumed (following the Apache convention that maps a DirectoryIndex automatically).

The following diagram depicts the workflow:

Zend Framework Controller Workflow

If you need more in-depth information, see the Zend Framework Controller.

Action

When a controller runs, it performs the requested action. Action is the basic unit in the Controller. The action function name is lower-cased, and the word Action is appended. Thus, in our example above, the action components becomes componentsAction(), and the final method called is RoadmapController::componentsAction().

Then, you can do anything you need in the actions.

Clone this wiki locally