trigger_events in IonAuth ? |
[eluser]solid9[/eluser]
Hi guys I'm trying to understand IonAuth Trigger_event method. Code: public function trigger_events($events) Can someone explain to me in simple english what the method do? Thanks in advanced.
[eluser]Matteo[/eluser]
Ion_Auth uses this function to call and set various custom functions through CI's hooks feature. Take a look at the previous 4 functions in the model. Code: public function set_hook($event, $name, $class, $method, $arguments) I don't pretend to fully understand everything that is going on here, but he uses it extensively throughout the code.
[eluser]nnolting[/eluser]
It seems like a really cool feature, although I have not been able to get it to work and the example in the documentation http://benedmunds.com/ion_auth/#trigger_events don't really show a good example of how the triggers that are in the ion auth model are supposed to be used. I wish there was a good example in the controller.
[eluser]adityamenon[/eluser]
It doesn't look like this system is related to CI's main hooks at all! Ion auth seems to have evolved a mini-hook environment of it's own.
[eluser]adityamenon[/eluser]
I did not look at the documentation for set_hook() : here's a gist explaining more: https://gist.github.com/657de89b26decda2b2fa
[eluser]adityamenon[/eluser]
This is recommended reading http://benedmunds.com/ion_auth/#set_hook
[eluser]jmadsen[/eluser]
A little late to the party, but I have been doing a little work with Ion Auth lately & wrote this up explaining the use of hooks http://www.codebyjeff.com/blog/2013/01/u...h-ion_auth |
Welcome Guest, Not a member yet? Register Sign In |