Welcome Guest, Not a member yet? Register   Sign In
Error in docs?
#1

[eluser]iainco[/eluser]
http://ellislab.com/codeigniter/user-gui...asses.html


This is my current setup which is working

"MY_Controller" (changed prefix) in my libraries dir:
Code:
class Base_Controller extends Controller
{
    function __construct()
    {
        parent::__construct();
    }
}

Normal controller in my controllers dir:
Code:
class Home extends Base_Controller
{
    function index()
    {
        
    }
}


But from the docs I was lead to believe my first controller should extend "CI_Controller" but if I tried that I got an error (saying CI_Controller did not exist) so had to just extend "Controller".
#2

[eluser]bezidejni[/eluser]
That is because the Controller class has no CI_ prefix in its name.

I agree it's a little confusing but since you are extending base CI classes, I think it's expected of you to look in the class you're extending and find out its exact name, in this case, Controller.




Theme © iAndrew 2016 - Forum software by © MyBB