Reputation: 88197
i wonder how do i get any bootstrap resource from anywhere in the application. eg. Zend_Validate, Zend_Auth_Adapter etc?
Upvotes: 12
Views: 7909
Reputation: 20726
$bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');
$resource = $bootstrap->getResource('whatEver')
Upvotes: 25
Reputation: 8382
Have a look at this: http://weierophinney.net/matthew/archives/235-A-Simple-Resource-Injector-for-ZF-Action-Controllers.html
That will make it easy passing it to the controller. From the controller you can then pass individual resources to the other things you need.
Upvotes: 2