codeignitermodulehmvc

how to load model on HMVC with CodeIgniter?


I am using the libraries for the HMVC, I am using CI 2.1 and I just cannot start with basic things, could anybody tell me how to load the model of the controller when I work as modules?

I read this docs https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home and I created the config/routes file.

Controller:

class Testcase extends MX_Controller {
   function index()
   {
      echo "test1";
      $this->load->model('testcase/testcase_model');
      echo "test2";
   }
}

I used the "echo" to see where it fails, because it doesnt return me any error... so, when I load the module, it simply doesn't work, I also tried it this way

$this->load->model('testcase_model',NULL,TRUE);

but still no success...

Model:

class Testcase_model extends MX_Model {
   function __construct(){  
      parent::__construct();  
   }    

   function testcase(){
      return "success";
   }
}

When I install the library I copy the third party folder and in the core one.

Could anybody give me some clue for this issue?

Thanks!


Solution

  • There is no MX_Model that I am aware of, simply extend CI_Model.