If you go the action helper way and want to use the getStaticHelper method
Hector mentioned,

$myHelper =
Zend_Controller_Action_HelperBroker::getStaticHelper('MyHelper');

make sure you tell the HelperBroker the prefix-directory combo where to look
for it. I.e. if MyHelper is actually MyApp_Controller_Helper_MyHelper, tell
it

Zend_Controller_Action_HelperBroker::addPath('MyApp/Controller/Helper',
'MyApp_Controller_Helper');

If you don't tell it this I don't think it can find it using the short name.

You can also just add the single action helper (in your bootstrap or
somewhere early (before dispatch runs)) 

Zend_Controller_Action_HelperBroker::addHelper(new
MyApp_Controller_Helper_MyHelper());
-- 
View this message in context: 
http://n4.nabble.com/Same-predispatch-in-every-controller-Where-s-a-better-place-to-put-it-tp1288632p1288952.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to