I've previously created an action helper Website_Layout_ActionHelper
which extends Zend_Controller_Action_Helper_Abstract
and has a getName
method which returns "layoutSelector".
This helper has been working fine for years along with several other helpers that have been put together, although none of them call on any of the others.
I'm now trying to create a new action helper which the layout helper needs to call on.
The new action helper is Website_UserInfo_ActionHelper
- it is set up in practically the same way as the other helpers (file paths, etc), and has a getName
method returning userInfo
.
However, when I try to access the new helper from my layout helper, I get the following exceptions:
Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'UserInfo' in /usr/share/php/Zend/Controller/Plugin/Broker.php on line 336
Zend_Loader_PluginLoader_Exception: Plugin by name 'UserInfo' was not found in the registry; used paths: Zend_Controller_Action_Helper_: Zend/Controller/Action/Helper/ in /usr/share/php/Zend/Loader/PluginLoader.php on line 424
Zend_Controller_Action_Exception: Action Helper by name UserInfo not found in /usr/share/php/Zend/Controller/Action/HelperBroker.php on line 369
However, when I dump the array from Zend_Controller_Action_HelperBroker::getExistingHelpers()
instead of trying to call Zend_Controller_Action_HelperBroker::getHelper('userInfo')
the userInfo helper is there...
The fact that the error messages are capitalising the UserInfo name is probably a clue, but I don't understand why I'm getting this behaviour when all the other helpers are happily working. Is it because I'm trying to access the helper from inside another helper? Because in my reading, this should be possible.
So, the question: why do I get exceptions when trying get a helper from the broker when the helper is actually loaded?