I also tried this, and goes into a endless loop. I viewed the front
controller dispathing code, it really did this.
/**
* Attempt to dispatch the controller/action. If the
$this->_request
* indicates that it needs to be dispatched, move to the next
* action in the request.
*/
do {
$this->_request->setDispatched(true);
/**
* Notify plugins of dispatch startup
*/
$this->_plugins->preDispatch($this->_request);
/**
* Skip requested action if preDispatch() has reset it
*/
if (!$this->_request->isDispatched()) {
continue;
}
/**
* Dispatch request
*/
try {
$dispatcher->dispatch($this->_request,
$this->_response);
} catch (Exception $e) {
if ($this->throwExceptions()) {
throw $e;
}
$this->_response->setException($e);
}
/**
* Notify plugins of dispatch completion
*/
$this->_plugins->postDispatch($this->_request);
} while (!$this->_request->isDispatched());
} catch (Exception $e) {
if ($this->throwExceptions()) {
throw $e;
}
$this->_response->setException($e);
}
Is there anyone know how to skip controller action dispatch with plugin, I
already thought this for a whole weekend. My purpose is to use the cached
page instead, it seems impossible to skip action dispatch in ZF right now, i
also tried action helper.
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/Is-it-possible-to-skip-an-action-from-a-plugin-tp653411p3593278.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]