[eluser]got 2 doodle[/eluser]
I think what you are looking for is to extend the controller class.
If you look in /system/libraries/Controller.php this is the main controller class.
If you extend the controller in /system/application/libraries/MY_controller.php
Then if you build (extend) all of your controllers based on MY_controller.php then any changes made to MY_controller.php will affect all of your controllers.
Take a look at BackendPro (search the forum) it does this extensively.
Code:
class Site_Controller extends Controller
{
var $_container;
function Site_Controller()
{
// Call parent constructor
parent::Controller();
// Display page debug messages if needed
/*if ( is_superadmin() AND $this->preference->item('page_debug'))
{
$this->output->enable_profiler(TRUE);
}*/
// Set site meta tags
//$this->page->set_metatag('name','content',TRUE/FALSE);
$this->page->set_metatag('content-type','text/html; charset=utf-8',TRUE);
$this->page->set_metatag('robots','all');
$this->page->set_metatag('pragma','cache',TRUE);
log_message('debug','Site_Controller Class Initialized');
}
}
This does some default stuff..
Quote: class Public_Controller extends Site_Controller
{
function Public_Controller()
{
// Call parent constructor
parent::Site_Controller();........
Quote: class Home extends Public_Controller
{
function Home()
{
parent:ublic_Controller();
}
function index()
And so it goes...
...like an onion.
hope this helps
doodle