I am working with Zend_Application and multiple modules.
I am trying to accomplish one thing with module bootstraps.
I have one _initThing method in couple of module bootstraps. I want to
init Thing resource on all modules only per request, and not automatted
from an action like that:
$bootstrap = $this->getInvokeArg('bootstrap');
$resource = $bootstrap->getPluginResource('modules');
$moduleBootstraps = $resource->getExecutedBootstraps();
foreach($moduleBootstraps as $moduleBootstrap)
if($moduleBootstrap->hasResource('Thing'))
$moduleBootstrap->getResource('Thing');
Problem is that resource is initialized automatically when the module
bootstrap is loaded. How can i avoid one module bootstrap resource to
get initialized automatically ?
--
Best regards,
Cristian Bichis
www.zftutorials.com | www.zfforums.com | www.zftalk.com | www.zflinks.com
没有评论:
发表评论