2013-04-09 77 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');