CodeIgniter Forums
Controller Plugin? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Controller Plugin? (/showthread.php?tid=55039)



Controller Plugin? - El Forum - 10-07-2012

[eluser]christatedavies[/eluser]
I have used Zend Framework extensively and now I am using CodeIgnitor for a project, but I want to write a custom controller plugin.

Is this possible in CI? Its basically a function that the front controller automatically calls, like a login check, to save the coder having to call the methods manually.

Any advise appreciated.

Chris


Controller Plugin? - El Forum - 10-07-2012

[eluser]PhilTem[/eluser]
You want to create something called a MY_Controller which all your controllers will extend.
Have a look here to see what this actually is about: http://codeigniter.tv/a-10/Extending-the-core-MY_Controller-and-beyond


Controller Plugin? - El Forum - 10-08-2012

[eluser]christatedavies[/eluser]
Thanks that sounds exactly like what I want.

Cheers.