CodeIgniter Forums
Passing Controller name and function - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Passing Controller name and function (/showthread.php?tid=56792)



Passing Controller name and function - El Forum - 01-20-2013

[eluser]R_Nelson[/eluser]
I want to be able to pass the controller name and the function it is gona run to my log program.

anyone know how i can do this:-)


Passing Controller name and function - El Forum - 01-21-2013

[eluser]rogierb[/eluser]
take a look at hooks in the userguide

I use a post-controller hooks to do some logging.


Passing Controller name and function - El Forum - 01-21-2013

[eluser]PhilTem[/eluser]
These are some possible places to put it (besides a post-controller hook):

- MY_Controller::__construct()
- MY_Controller::__destruct()
- MY_Output:Confusedet_output()