开发者

How does Module bootstrap work for default module?

I've setup my application with two modules, one for Admin and other for the rest of application called default. Then I've created a Bootstrap file for Admin module, and when I've tried to set the bootstrap for default module I've got an inifite loop and my apache crashes.

I'm not sure if I completely under开发者_C百科stand the bootstrap dynamics. Originally I had tried to bootstrap my default module to get access to my forms inside its folder. But only work if I set it up in the bootstrap located in application root (application/bootstrap.php) with that:

$moduleLoader->addResourceType('form','modules/default/forms/','Form');

Did I do anything wrong?


It looks like there was a bug/improvement open with Zend for this problem. The relevant quote from the bug:

The reason that the default module is skipped is because the documented use case – particularly how we setup an application in Zend_Tool – is that the default module is directly beneath application/ and contains the application bootstrap. If we then allow loading the default module's bootstrap... we get into a recursive loop.

The bug is now resolved, so you might just need to update your Zend Framework to the latest version.


ZF Loads for some weird reason all module bootraps on one request (even if the modules are not being requested)

So maybe you have some conflicts with the admin and default module.

For module bootraps too load add in your .ini

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] = ""

And Bootstrap.php

class Modulename_Bootstrap extends Zend_Application_Module_Bootstrap{}

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜