Include a model class without initialize it. |
[eluser]megablue[/eluser]
[quote author="noctrum" date="1281980046"]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 { other_model.php Code: class Other_model extends MY_Model { Controller Code: $this->load->model('other_model') Yes, i knew about extending the CI base model with CI way. However i have a fairly dynamic application that requires multiple 'base models' base on different situations. Some models share fair amount of code even their default methods, some are distinctly different. |
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
|