Pages

Sunday 1 July 2012

zend-action-helper

A helper can be initialized in several different ways, based on your needs as well as the functionality of that helper. The helper broker is stored as the $_helper member of Zend_Controller_Action; use the broker to retrieve or call on helpers. Some methods for doing so include:

Following are the 3 different but equal method to set the message

$flashMessenger = $this->_helper->getHelper('FlashMessenger'); $flashMessenger->addMessage('We did something in the last request');
 OR
$flashMessenger = $this->_helper->FlashMessenger; $flashMessenger->addMessage('We did something in the last request');
 OR
$this->_helper->FlashMessenger('We did something in the last request');

No comments:

Post a Comment

Please add comments only related to zend framework certification.