I have strictly followed the how-to article by Phil Sturgeon, to extend the base controller. But I get still some errors.
My 3 classes:
// applicatio
You should place Public_controller
in with MY_Controller
inside MY_Controller.php
// application/libraries/MY_Controller.php
class MY_Controller extends Controller{
public function __construct(){
parent::__construct();
}
}
class Public_Controller extends MY_Controller{
public function __construct(){
parent::__construct();
}
}
I use __construct everywhere and it works fine I recently wrote up an article on how to do this in relation to wrapping your auth logic into your extended controllers. It's about half way down when I start discussing constructing your controllers.