Zend_Loader_Autoload_Module 不加载模块类

发布于 2024-12-08 07:56:15 字数 1082 浏览 4 评论 0原文

我的错误 - 我没有正确阅读错误消息 - 我仍在引导程序中var_dumping Zend_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_dumping 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_dumping Zend_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_dumping 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你不是我要的菜∠ 2024-12-15 07:56:15

我的错误 - 我没有正确阅读错误消息 - 我仍在引导程序中var_dumping Zend_Loader_Autoload,这导致了“标头已经已发送”异常。请记住在不调试输出的情况下尝试!

My mistake - I didn't read the error messages properly - I was still var_dumping Zend_Loader_Autoload in the bootstrap which was causing a "headers already sent" exception. Remember to try without debugging output!

ま昔日黯然 2024-12-15 07:56:15

你的 Form 类的名称是什么,

Manager_Form_Foo 

form foo 位于哪里

manager/forms/Foo.php

what is the name of your Form class is it

Manager_Form_Foo 

where form foo is located at

manager/forms/Foo.php
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文