Code:
class Settings extends USER_Controller {...}
class USER_Controller extends MY_Controller {...}//limit access to user and define some params and functions that is user depended
class MY_Controller extends CI_Controller {...}//provide extra functionality accross all controllers
well if i try to create above 3 class's this will not work.
yet if i just use settings extends MY_Controller it will work fine.
so is there a way i can put a middle class between my controller and MY_Controller -the base controller that extends CI_Controller ?
In CI2.2 I was using function below inside config.php but on CI 3.0 I get errors.
Code:
function __autoload($class){
if (substr($class,0,3) !== ‘CI_’) {
$file = APPPATH . ‘core/’ . $class . EXT;
if (file_exists($file)) {
include $file;
}
}
}