The question is about the router's setDispatched() method of Zend Framework...
I have a fooAction()
and a loginAction()
in the same controller (the indexController).
I also have an ActionHelper
and I'm using it's preDispatch()
method. At the end of this function I have an if
statement where I check the ACL:
public function preDispatch() {
// some code...
if (!$this->_acl->isAllowed($role, $resource, $privilege)) {
$request->setModuleName('default');
$request->setControllerName('index');
$request->setActionName('login');
$request->setDispatched(false); //what does this mean exactly??
}
}
So when I want to reach fooAction()
, and the user hasn't got the permission, I set the Action name to 'login'...
Now my question is: what does the $request->setDispatched(false);
mean exactly?
Does it indicate that ZF can start to dispatch the loginAction() because it hasn't been dispatched yet (setDispatched(false);)?