ZF-81: Documentation for next action could be improved (TRAC#94)




The documentation (section 2.3) states that: {quote} "dispatch() is where the work gets done. This method must execute the action of the controller. It must return either a dispatch token or a boolean, FALSE, to indicate that there is no more work to do." {quote} It isn't made clear in the user documentation how to get dispatch() to return a new token so as to continue with the next action in the dispatch loop. Returning a new dispatch token from indexController, for instance, doesn't work. You must call the _forward() method at the end of the current action, e.g.

class IndexController extends Zend_Controller_Action {

    public function indexAction() {
        echo 'Hello from IndexController';
                $this->_forward('index', 'nextaction', array('param1', 'param2'));

    public function nextactionAction() {
        $params = $this->_getAllParams();

Adding something along these lines to the documentation would certainly have helped me.


New paragraph added to Zend_Controller_Overview.xml in revision 1447.