Issues

ZF-2496: extract method in Zend_Controller_Action_Helper_ViewRenderer to check if should render or not.

Issue Type: Improvement Created: 2008-01-25T06:55:43.000+0000 Last Updated: 2008-02-26T12:56:04.000+0000 Status: Resolved Fix version(s): - 1.0.4 (26/Feb/08)

Reporter: Julian Davchev (jmut) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Controller

Related issues: Attachments:

Description

In Zend_Controller_Action_Helper_ViewRenderer to have method that checks weather or not render should occur So all logic of

<pre class="highlight">
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.

<pre class="highlight">
    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.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts