On Thursday 25 June 2009 23:54:41 Vince42 wrote: > Hi, > > I have two module directories: default and test. > > This is an attempt to set up a very basic module structure in order to > understand the new bootstrapping. > > In application.ini I basically do > > resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" > resources.modules[] = > > which works fine, as I can access the controllers. > > Adding an empty Bootstrap.php to the test module directory makes it > possible to instantiate models from the test directory - nice. > > But when I try to instantiate a model from the default module directory, > I get the error message that the class could not be found. > > What do I have to set in the application.ini in order to treat the > default module directory like all the others? > > I tried adding an empty Bootstrap.php to the default directory, I tried > the prefixDefaultModule and other options in the application.ini (but > that lead to odd errors) and I tried all kinds of typos > (Default_Model_TestModel, Model_TestModel etc) - nothing worked.
This has become a FAQ and IMHO should be addressed in the doc. The default module is by design considered somewhat different from other modules (to be non-portable from app to app, to be exact) and it's bootstrap class is considered to be the "main bootstrap" class which you use for your entire app. I think we should rethink this as it's obvious many people use the default module just like any other so the behavior should be as expected, even if adding an additional option. -- Dado
