CodeIgniter Forums
Callbacks/ Interceptors - 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: Callbacks/ Interceptors (/showthread.php?tid=15893)



Callbacks/ Interceptors - El Forum - 02-18-2009

[eluser]Aniket[/eluser]
Hi,

Is there a way in CI to call callback method or interceptors as is servlets ?. Please suggest if any.


Callbacks/ Interceptors - El Forum - 02-18-2009

[eluser]pistolPete[/eluser]
I don't know when callbacks are used in "servlets", but you can use callbacks in PHP.
In CI you use them e.g. in the Validation Library.
In order to help you, you need to specify where you need a callback functionality.


Callbacks/ Interceptors - El Forum - 02-18-2009

[eluser]Aniket[/eluser]
Sry callbacks are used in EJBs. but apart from form validation callbacks can i have my own methods to be called as callbacks


Callbacks/ Interceptors - El Forum - 02-18-2009

[eluser]pistolPete[/eluser]
Just tell me where you need a callback?
Have a look at php.net about callbacks in php: http://php.net/callback


Callbacks/ Interceptors - El Forum - 02-18-2009

[eluser]Aniket[/eluser]
thanx for the reference link.

I want my custom logging method to be called every time i am making any entry to database. I think the resource you have provided can help me ....will try out n post my findings.

Thanks


Callbacks/ Interceptors - El Forum - 02-18-2009

[eluser]pistolPete[/eluser]
I would use hooks or extend the database class.