ZF-9996: Module Bootstrapper ignores Default Module setting

Issue Type: Bug Created: 2010-06-16T06:48:35.000+0000 Last Updated: 2012-11-20T21:38:09.000+0000 Status: Open Fix version(s): Reporter: Serge Khodorkovsky (sergek) Assignee: None Tags: - Zend_Application

Related issues: Attachments: - Modules.patch


in application.ini, module modX is set to be the default module and prefixDefaultModule parameter is turned on. However the application still looks for a class Default_Bootloader rather than modX_Bootloader.

One of the workarounds is to create a module directory 'default' with a file Bootstrap.php that will have:

<pre class="highlight">
class Default_Bootstrap extends Zend_Application_Module_Bootstrap

Our scenario: Current system has 2 modules, modX and modY, with modX being the default module +for now+. Future development will lead to further development of modY and modZ, with either modY or modZ becoming the default module. Switching between the default modules has to be as "painless" as possible (translation: minimum-to-none code changes)


Posted by Serge Khodorkovsky (sergek) on 2010-06-16T06:51:58.000+0000

The attached patch (Modules.patch) is an alternate solution I've arrived at. Basically during the Module Bootstrapper selection, it checks if the current module is the one selected to be the default module and if the prefixDefaultModule parameter is enabled. If both conditions are true, it switches the current module and module directory to the default one, that is the module specified as default using the defaultModule setting.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.