CodeIgniter Forums
Run standard controller manually - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12)
+--- Thread: Run standard controller manually (/showthread.php?tid=62142)



Run standard controller manually - nasser.man - 06-13-2015

how i can run or execute standard controller?

i mean when user type "site/controller/method/params", CI triggers maincontroller/mainrouter and pass "controller" and "method" and "params" to it so i could to do something before or after executing that controller.

with HMVC i can do this for sub_controllers in modules folder using modules::run, but for main controllers in application/controllers, how i can do that?


i need this feature Sad Sad


RE: Run standard controller manually - gadelat - 06-13-2015

It's not supported, CI is not HMVC framework. If you need that, use HMVC extension. It's frowned upon on though, since if you need the code in Controller on more places, you should put it in model/library instead.