Zend recommends to put controller action helpers in the mvc into /application/controllers/helpers. Is that the right way to use those?
Do I have to instantiate them in the bootstrap/application.ini?
My helper has a direct action and is called Controllers_Helpers_Redirectlogin.
Thanks for your help, I appreciate!
Following the recommendation is good. By default, it doesn’t appear that the autoloader is set up to look in the recommended paths by default even though the manual page you referenced states:
To get around it, just hint to the HelperBroker the additional paths to look in by adding this to your
Bootstrap.phpfile:Also note, for the autoloader to work correctly, you should name your class
Controller_Helper_RedirectLoginrather thanControllers_Helpers_RedirectLogin. Usually autoloaded classes drop the plurals (e.g.models/User.phpmaps toclass Model_User).EDIT: You can also tell the helper broker about the helper paths in the
application.inifile as well. Example: