zendframework/zf2 — pull request #2821 by guice (2012-10-22 17:16:24+00:00)
Title: Added loadModule.post event to loadModule().

I added a loadModule.post event that is trigged at the end of loadModule() within Zend\ModuleManager\ModuleManager.

While I found loadModules.post useful, there was no way to do the same when loading just one module manually. loadModule.post event is triggered right after loadFinished is set to true.

I required a post event due to loading module dependencies: a module would dynamically load, and after it loads, the post even will read its dependencies, and load those modules. loadModule event was called before a module officially "loads" do when a dependent, of a dependent, recursively called that was suppose to be loaded, "loadModule" event did not see the module loaded, and went through an infinite loop. "loadModule.post" will now recognize a module was already loaded, and bail-out before attempting to call itself again.