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

Scheduling for 1.0.4 release

Committed in both trunk and release-1.0 branch. Added the method _shouldRender(), encapsulating the logic of the render decision process.