CodeIgniter Forums

Full Version: Creating a base controller class and autoloading in 2.0.3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

I've always built a base controller with some functions like render and load_defaults, and in past versions, I've made it a library, autoloaded it from the config file, and then declared my classes as

class My_controller extends Base_Controller {


However, in 2.0, from what I've seen, this doesn't work. When I try to do that now, it claims that "Base_Controller" hasn't been defined. I slipped an echo before the class declarations both in the base controller and the controller file being called, and the controller file being called appears to be loaded before the stuff from the autoload. Any ideas? Work around or otherwise!