dongqin6926 2010-10-16 10:34
浏览 9
已采纳

zend模型 - 找不到适配器错误

have defined different models and modelMappers in my php project.

my folders are structured as follows

-application
--models
---DbTable
----modelName
---modelMapperName

modelName.php
class Application_Model_DbTable_ModelName extends Zend_Db_Table_Abstract{

}

modelMapper.php
class Application_Model_ModelMapper
{
}

everytime i try to access the values in my database by creating an instance of my mapper in the controller i get the message No adapter found for Application_Model_DbTable_ModelName

i thought this can be an issue with the autoloader and added the following code in the bootstrap,

$loader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'Application',
'basePath' => APPLICATION_PATH
));

$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->setFallbackAutoloader(true);

return $loader;

but it still didnt work, can anyone help me figure out where i am going wrong?

thank you.

  • 写回答

3条回答 默认 最新

  • duandao1931 2010-10-18 12:33
    关注

    i found out that the variable i was trying to access didn't start with an underscore and also capitalization issues with the models created was causing the problem.

    Thank you all for helping

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 pyqt6如何引用qrc文件加载里面的的资源
  • ¥15 安卓JNI项目使用lua上的问题
  • ¥20 RL+GNN解决人员排班问题时梯度消失
  • ¥15 统计大规模图中的完全子图问题
  • ¥15 使用LM2596制作降压电路,一个能运行,一个不能
  • ¥60 要数控稳压电源测试数据
  • ¥15 能帮我写下这个编程吗
  • ¥15 ikuai客户端l2tp协议链接报终止15信号和无法将p.p.p6转换为我的l2tp线路
  • ¥15 phython读取excel表格报错 ^7个 SyntaxError: invalid syntax 语句报错
  • ¥20 @microsoft/fetch-event-source 流式响应问题