![]() |
DRY Base Controler - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: DRY Base Controler (/showthread.php?tid=63194) |
DRY Base Controler - ComputingFroggy - 10-05-2015 Hi, I am playing around with Ion Auth library. I came across an article from Kyle Noland explaining how to set up base controller performing the identity check. This was based on Phil Sturgeon article CodeIgniter Base Classes: Keeping it DRY. It did not work for me: the Secure_Controller would not load, I was getting an error stating it wasn't found ! I had to move the Secure_Controller class declaration to the application/core/My_Controller.php file. I believe using Base Controller is a fairly common setup: has anyone managed to get this working (without putting all the classes in the MY_Controller.php file) ? (This is not an Ion Auth problem, this is a loading base controller problem). Cheer, L@u RE: DRY Base Controler - InsiteFX - 10-05-2015 You need to add this autoloader to your ./application/config.php file: PHP Code: /* RE: DRY Base Controler - ComputingFroggy - 10-08-2015 Thanks, that did the trick ! |