2008年11月25日星期二

[fw-mvc] Register a plugin within a plugins routeShutdown() method

Hi,

I have a plugin called Plugin_ModuleSetup which has a routeShutdown()
method implemented. In this method there is check if there is a plugin
called Plugin_ModuleInit for the current module. If yes, this plugin is
loaded and registered. This works fine for dispatchLoopStartup() method
and all other methods that follow. But the routeShutdown() method is not
called for this new plugin.

My idea is to register the module-dependent Plugin_ModuleInit in the
frontcontroller and manually call the Plugin_ModuleInit::routeShutdown()
method from within the Plugin_ModuleSetup::routeShutdown(). But I don't
know if this is really good practice.

Any other ideas how to solve this?

Best regards,

Ralf

没有评论: