Zend_Loader_Autoload_Module 不加载模块类
我的错误 - 我没有正确阅读错误消息 - 我仍在引导程序中
var_dump
ingZend_Loader_Autoload
,这导致了“标头已发送”异常。请记住在不调试输出的情况下尝试!
我有一个在 ZF 1.11.11 上运行的模块化应用程序,具有以下目录结构:
application/
Bootstrap.php
modules/
default/
controllers/
models/
views/
manager/
Bootstrap.php
controllers/
models/
forms/
views
layouts/
configs/
相关 application.ini
声明:
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] = ""
本质上我的问题是管理器模块中的控制器无法加载 forms 中的表单/
管理器目录的目录。 var_dump
ing Zend_Loader_Autoloader::getInstance()
显示所有 Application_
映射都已定义,(尽管到了错误的位置,/application
而不是 /default
),并且没有为 Manager_
定义映射。
令我困惑的是manager/
中的Bootstrap.php被加载了,这意味着该模块已被检测到。这个引导程序只是扩展了 Zend_Application_Module_Bootstrap
。
我在这里缺少一些神秘的配置值吗?文档似乎对此非常稀疏(也希望对此进行一些深入的解释)。
My mistake - I didn't read the error messages properly - I was still
var_dump
ingZend_Loader_Autoload
in the bootstrap which was causing a "headers already sent" exception. Remember to try without debugging output!
I have a modular application running on ZF 1.11.11 with this directory structure:
application/
Bootstrap.php
modules/
default/
controllers/
models/
views/
manager/
Bootstrap.php
controllers/
models/
forms/
views
layouts/
configs/
Relevant application.ini
declarations:
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] = ""
Essentially my problem is that a controller in the manager module cannot load a form in the forms/
directory of the manager directory. var_dump
ing Zend_Loader_Autoloader::getInstance()
shows that all the Application_
maps are defined, (although to the wrong place, /application
rather than /default
) and no maps are defined for Manager_
.
What confuses me is that the Bootstrap.php in manager/
is loaded, which means that the module has been detected. This bootstrap simply extends Zend_Application_Module_Bootstrap
.
Is there some arcane configuration value I'm missing here? The documentation seems to be quite sparse on this (would also love some in-depth explanation on this).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的错误 - 我没有正确阅读错误消息 - 我仍在引导程序中
var_dump
ingZend_Loader_Autoload
,这导致了“标头已经已发送”异常。请记住在不调试输出的情况下尝试!My mistake - I didn't read the error messages properly - I was still
var_dump
ingZend_Loader_Autoload
in the bootstrap which was causing a "headers already sent" exception. Remember to try without debugging output!你的 Form 类的名称是什么,
form foo 位于哪里
what is the name of your Form class is it
where form foo is located at