-
Notifications
You must be signed in to change notification settings - Fork 3
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:
If you need more in-depth information, see the Zend Framework Controller.
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.