I'm looking at refactoring some code out of an Actions postDispatch into a plugin. The code currently is assigning a value to the view object and I can't find out how to get access to the view object from inside the plugin.
The old Zend_Controller_Action::postDispatch():
public function postDispatch() {
...
$this->view->flashMessages = array_merge($flashMessenger->getCurrentMessages(), $flashMessenger->getMessages());
...
}
The new Zend_Controller_Plugin_Abstract::postDispatch():
public function postDispatch(Zend_Controller_Request_Abstract $request) {
...
// How to get access to Zend_Controller_Action::$view?
// $this->view->flashMessages = array_merge($flashMessenger->getCurrentMessages(), $flashMessenger->getMessages());
...
}
Is there a straight forward way to do this?