2013-04-09 78 views
-1

嗨,大家好。HMCV如何从其他模块加载模型

这里我真的很简单的问题。

我在

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/ 

可能有人建议乔希Yudell该如何可以用HMCV来做到这一点。我试过使用

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

在此先感谢。 Josh Yudell

回答

0

从Guestbook Module中调用管理模块怎么样?你不应该直接访问模型。

0

我建议你应该为你的负载提供模块目录的路径。您还没有与你在工作环境中提供您的问题

在笨HMVC,这里的结构是更严格。

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