Zend 模块结构的全局助手
我的文件如下所示:
/Zend
/Application
/Configs
/Modules
/home
/controllers
/views
/login
/controllerS
/forms
/library
/login
/models
/plugins
/views
我想创建一个可供所有模块使用的助手。有点像“全球帮手”。有没有标准的方法来实现这一点?
My files look like this:
/Zend
/Application
/Configs
/Modules
/home
/controllers
/views
/login
/controllerS
/forms
/library
/login
/models
/plugins
/views
I would like to create a helper which which can be used by all modules. Kinda a "global helper". Is there a standard way to accomplish this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
什么样的帮手?看法?或者像行动助手之类的东西?如果它只是一个实用程序样式类(未附加到 MVC 的特定部分),只需将其放入
/library/NAMESPACE
即可。然后只需将该命名空间添加到
application.ini
中的自动加载器即可。然后你就可以
What kind of helper? View? Or something like a action helper? If it's just a utility style class (not attached to a specific part of the MVC), just putting it in
/library/NAMESPACE
works well.Then just add that namespace to the autoloader in
application.ini
.And you can then