Zend Framework 中的类自动加载
可能是很简单的问题,但我刚刚开始与采埃孚合作。
我创建了一个类 class Application_Paginator_Adapter_DoctrineQuery Implements Zend_Paginator_Adapter_Interface
并将此类添加到文件 application/paginator/adapter/DoctrineQuery.php
中。当我尝试在控制器内创建该类的对象时,出现错误:
致命错误:找不到类“Application_Paginator_Adapter_DoctrineQuery”。
我认为这个类应该自动包含在内。怎么做呢?
我正在使用 ZF 1.11 和 MS Windows。
Probably quite easy question, but I've just started working with ZF.
I have created a class class Application_Paginator_Adapter_DoctrineQuery implements Zend_Paginator_Adapter_Interface
and I've added this class to a file application/paginator/adapter/DoctrineQuery.php
. When I try to create object of that class inside controller I am getting error:
Fatal error: Class 'Application_Paginator_Adapter_DoctrineQuery' not found.
I thought this class should be included automatically. How to do that?
I am using ZF 1.11 and MS Windows.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
DoctrineQuery.php 应该位于
/library/Application/Pagination/Adapter 中
而不是
/应用程序/分页/适配器
DoctrineQuery.php should be in
/library/Application/Pagination/Adapter
rather than
/application/Pagination/Adapter