[eluser]Unknown[/eluser]
I have just started on CI and have finished going through the hello world and blog tutorial. I have been trying it out further and have been wondering how does one extend a controller class or should one even need to extend a controller class?
I guess one example is a controller for a generic shop front. So it would be
shop.php
Code:
class Shop extends Controller
{
}
Then I would like to use that same controller for a shop thats specific for downloads only
shopdownloads.php
Code:
class ShopDownloads extends Shop
{
}
In normal PHP I would usually just add
Code:
include (path/to/shop.php controller);
on top of shopdownloads.php and continue on.
Is there a proper way to do this in CI or have I got my basic concepts wrong?