CodeIgniter HMVC:与其他模块通信的正确方式


CodeIgniter HMVC: Correct way of communicating with other modules?

假设我有两个模块:A和B。

如果我想从模块a调用模块B的一个模型中的函数,正确的方法是什么?

模块之间的通信应该只发生在控制器之间,还是我可以直接从控制器形式的模块a中的模块B调用模型?

谢谢。

按照下面的步骤操作

1) load model of B from A module like $this->load->model("b_model");
2) if your function name is user then call like this $this->b_model->user();