HMCV如何从其他模块加载模型

时间:2013-04-09 09:00:40

标签: hmvc

大家好。

这里我的问题非常简单。

我在

modules/guestbook/admin.php 

我想从不同的模块中加载模型

modules/admin/models/

此方法:

$this->load->model('someModel', 'someModel'); is not working bcz HMVC is looking only in the same module the controller is in or in application/models/ 

有人可以向Josh Yudell建议如何用HMCV做到这一点。我尝试使用

Modules::find,Modules::load Modules::load_file, bt there is no result with it.

提前致谢。 Josh Yudell

2 个答案:

答案 0 :(得分:0)

如何从留言簿模块中调用管理模块。你不应该直接访问模型。

答案 1 :(得分:0)

我建议您为负载提供模块目录的路径。您还没有提供您正在处理的环境中的问题。

在codeigniter HMVC中,结构更严格:

 Modules::run('admin/get_account_details_model'); or $this->load->module('admin/get_account_details_model');