문제

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 understand 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{}

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top