According to this Extending core CI Classes , I can create a class in my application/core/MY_Protectedcontroller.php as:
//e.g. I want to extend core CI_Controller class.So
class MY_Protectedcontroller extends CI_Controller{
function __construct(){
parent::__construct();
$this->load->library('permission');
$this->load->library('authentication');
}
}
Well as you might discern my objective here..actually I want the auth and perm libraries to be available to all of my controllers thus I can authenticate very easily and programmatically. But when I tried to do:
class User extends MY_Protectedcontroller{
function __construct(){
parent::__construct();
.....// relevant codes
.....//relevant codes
}
}
It says the "Not Found" thing. Fatal error: Class 'MY_Protectedcontroller' not found in C:\xampp\htdocs\damcombd\application\controllers\admin\user.php on line 3