Welcome Guest, Not a member yet? Register   Sign In
model inheritance... what happens if... :O
#1

[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




Theme © iAndrew 2016 - Forum software by © MyBB