Welcome Guest, Not a member yet? Register   Sign In
Include a model class without initialize it.
#3

[eluser]danmontgomery[/eluser]
Yes, CI keeps a list of instantiated object. You should be using the subclass_prefix setting in config/config.php, then loading the model normally (http://ellislab.com/codeigniter/user-gui...aries.html).

If your subclass_prefix is MY_ (default), you would have MY_Model as your base class, then you would extend that class, and load it normally.

MY_Model.php
Code:
class MY_Model extends Model {
    // Some code
}

other_model.php
Code:
class Other_model extends MY_Model {
  // Some code
}

Controller
Code:
$this->load->model('other_model')


Messages In This Thread
Include a model class without initialize it. - by El Forum - 08-16-2010, 12:05 AM
Include a model class without initialize it. - by El Forum - 08-16-2010, 03:40 AM
Include a model class without initialize it. - by El Forum - 08-16-2010, 06:34 AM
Include a model class without initialize it. - by El Forum - 08-16-2010, 09:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB