can some one tell me how zend action helpers exactly work , i mean , even though i already used them in my code i feel some thing is missing in my understanding :
e.g. i have some thing like this
$this->_helper->viewRenderer->setRender('edit',null,true);
i my code , so that i will be able to render add-actions to use edit pages (since adding is the same as editing ….. on UI basis @ least )
but my question here is , as far as i can see the _helper is an instance of
/**
* Helper Broker to assist in routing help requests to the proper object
*
* @var Zend_Controller_Action_HelperBroker
*/
protected $_helper = null;
but when i try to see in the library folder this class “Zend_Controller_Action_HelperBroker” i can’t find a property named “viewRenderer”
The
$_helperis a magical little thing that loads action helpers when needed. It looks in registered paths – which by default isZend/Controller/Action/Helper– which is where you’ll find theviewRendererhelper.The fact that the class doesn’t have a
viewRendererproperty is because the HelperBroker handles all requests via the magic__callmethod.This call method looks for a helper (in this case viewRenderer) and calls the
direct()method on that helper.