EllisLab text mark
Advanced Search
     
Controller Plugin?
Posted: 07 October 2012 12:06 PM   [ Ignore ]
Joined: 2012-10-07
5 posts

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

 
Posted: 07 October 2012 01:42 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2011-02-23
882 posts

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

 Signature 

ignited Community Framework (WiP)  |  Read the User’s Guide. It won’t bite.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

CI example .htaccess

 
Posted: 08 October 2012 04:45 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2012-10-07
5 posts

Thanks that sounds exactly like what I want.

Cheers.