ZF-6685: add startupResources option for lazy load resources
Zend_Application is very useful as resource management. And I remade my modules with some custom plugin-resource(s). Some resources are required for inter-module ex. routes , but others are optional . Some optional resources may have expensive cost to initialize, ex. loading config from DB. And I have many modules in the system. Each module will have many resources for themselves. Usually, all resources will be booted in application's bootstrap process. It is ineffective things for some of the people, like me.
How about a plan to add a startupResources option to Zend_Application. It features an ordering starup resources and lazy load. Simply put, - If the _bootstrap method will be called without argment, it executes startup-resources in order. - A method "getResource" must be able to initialize a resource on-demand.
Change target is Zend_Application_Bootstrap_BootstrapAbstract::_bootstrap , getResources, adding setStartupResources