Object operators in zend framework -


a noob question

$this->_helper->viewrenderer->setnorender(); 

the above line taken indexcontroller's init method in tutorial have been following. code sample mean execute "setnorender" method viewrenderer object _helper object zend_controller_action object? or there code writing convention specific zend framework unaware of?

its not zend convention. php syntax.

$this refers current obj. using -> operator can access properties or methods.

does code sample mean execute "setnorender" method viewrenderer object _helper object zend_controller_action object?

yes correct.

$this->_helper->viewrenderer->setnorender();

this disable view, useful when using ajax request.

fyi: zend controller action

the primary reasons disable viewrenderer if not need view object or if not rendering via view scripts (for instance, when using action controller serve web service protocols such soap, xml-rpc, or rest). in cases, never need globally disable viewrenderer, selectively within individual controllers or actions.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -