Reputation: 1804
Can I access my action helpers from my models? What am avoiding is creating new models and calling the functions everytime I need some functionality.
Any tips?
Upvotes: 10
Views: 5496
Reputation: 31
Nice call @Daniel V - you can obviously bootsrap them for use in controllers, but models need to be directly instantiated
Upvotes: 0
Reputation: 9845
What about:
Zend_Controller_Action_HelperBroker::getStaticHelper('helpername')->doStuff();
Upvotes: 18
Reputation: 2683
if helper not registered you can get as $helper = new Library_Helper_Helper();
Upvotes: 1