CodeIgniter Forums
model inheritance... what happens if... :O - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: model inheritance... what happens if... :O (/showthread.php?tid=7362)



model inheritance... what happens if... :O - El Forum - 04-05-2008

[eluser]James Pax[/eluser]
Hey codeigniters Smile

just wondering what might happen if:

Code:
// Classic CI Model
class ClassicModel extends Model{

     function ClassicModel(){

     parent::Model();

     }

}
This is what I would like to try out:
Code:
//
class FridgeModel extends Model{

     function FridgeModel(){

     parent::Model();
     }

}

class BeerStock extends Fridge{


      #BeerStock management functions... :)


}

but what would happen and how should I implement it?

I would like to keep the use of the model loading:
Code:
$this->load->('beerstock');
I hope somebody might be able to clear this up for me! I would be ecstatic if I could use inheritence like that without disrupting anything.

James