ZF-2496: extract method in Zend_Controller_Action_Helper_ViewRenderer to check if should render or not.
Description
In Zend_Controller_Action_Helper_ViewRenderer to have method that checks weather or not render should occur So all logic of
if ($this->getFrontController()->getParam('noViewRenderer')) {}
//and
if (!$this->_neverRender
&& !$this->_noRender
&& (null !== $this->_actionController)
&& $this->getRequest()->isDispatched()
&& !$this->getResponse()->isRedirect())
{}
//is in standalone method
This will allow easier extend of the view Renderer.
public function postDispatch()
{
if ($this->getFrontController()->getParam('noViewRenderer')) {
return;
}
if (!$this->_neverRender
&& !$this->_noRender
&& (null !== $this->_actionController)
&& $this->getRequest()->isDispatched()
&& !$this->getResponse()->isRedirect())
{
$this->render();
}
}
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2008-02-14T11:14:26.000+0000
Scheduling for 1.0.4 release
Posted by Matthew Weier O'Phinney (matthew) on 2008-02-18T14:00:33.000+0000
Committed in both trunk and release-1.0 branch. Added the method _shouldRender(), encapsulating the logic of the render decision process.