我正在 Zend Framework 中组合一个模块化应用程序,并且正在努力加载特定于模块的 View Helpers。
我的目录结构是这样的...
application
---configs
---controllers
---forms
---layouts
---models
---modules
------user
---------controllers
---------forms
---------modules
---------views
------------filters
------------helpers
---------------currentUser.php
------------scripts
---------Bootstrap.php
---views
---Bootstrap.php
基本上我想访问 currentUser.php 中包含的视图助手但是当我把
<?php echo $this->currentUser(); ?>
我收到一条错误消息,指出找不到该文件。
我需要在配置文件中添加什么来加载这些帮助程序?
我的配置是这样的......
Autoloadernamespaces[] = "Zend_"
Autoloadernamespaces[] = "Default_"
Autoloadernamespaces[] = "User_"
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
resources.view[] =
resources.modules[] =