Hi,

i set noViewRenderer to true by default in the bootstrap file before
dispatch start, and check the module name in a controller plugin that hook
the preDispatch event to switch on/off to the viewRenderer,if there is admin
module,following code would be called in the plugin preDispatch() method:

public function preDispatch(Zend_Controller_Request_Abstract $request)
{
    $module = $request->getModuleName();

    if ('admin' == $module) {
        Zend_Controller_Front::getInstance()->setParam('noViewRenderer',
false);
        if (!Zend_Controller_Action_HelperBroker::hasHelper('viewRenderer'))
{
            Zend_Controller_Action_HelperBroker::getStack()->offsetSet(-80,
new Zend_Controller_Action_Helper_ViewRenderer());
        }
    }
}

but i found that the value of noViewRenderer passed to the dispacher remains
true. Because call the method setParams() of the Front controller not affect
the params that had been passed to the dispatcher.

So if call $this->getInvokeArg('noViewRenderer') in the controllers of admin
module ,it will return true not false, but call
$this->getFrontController()->getParam('noViewRenderer') will return false as
expected.

I want to know if that is the expected behaviour?Thx.

Reply via email to