On May 8, 2009, at 8:07 AM, keith Pope wrote:
2009/5/8 Rick Buitenman <[email protected]>:
Hi,
There are a number of threads on bootstrapping modules, but I think
it might
help to isolate what seems to be a reoccuring source of confusion
(at least
it is for me):
Am I right in assuming that *all* bootstraps of all modules are
executed
regardless for which module the request is?
Yes, the module bootstrap resource will loop and call each module
bootstrap, though it skips the default module.
Doesn't that partly negate a lot of the potential usefullness of the
Zend_Application concept when used in a modular setup?
I mean, I can understand why (I assume because routing hasn't happend
yet, and there's no way to tell yet which module is actually being
requested), and it's useful for those modules that add something that
is used throughout the entire application.
But the real world issue I have (and I assume from some of the
questions here I'm not the only one) is that I want to initialize
module-specific stuff only when that particular module is requested.
Which is something I currently do via a Controller plugin, not a
solution I'm particularly happy with. Although Zend_Application does
inspire a more elegant, reusable way of implementing this, it would be
great to have a similar "standard" solution, a sort of second phase
bootstrap.
Or am I completely missing the point of Zend_Application and is there
already a better way of doing this?
R.