CodeIgniter Forums
Events - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29)
+--- Thread: Events (/showthread.php?tid=61301)



Events - gadelat - 04-07-2015

Hooks should be renamed to events and modernized. Attaching, dispatching, manual firing etc.


RE: Events - dmyers - 04-11-2015

Yes Please!
The trick is setting it up and registering events when they are needed early in the setup process.
Hooks might need to stay just for that purpose and then the team could add the event handling methods to that library.

I would also go so far as having unix nice style priorities and use PHP closures for the code that's triggered as well as pass in the variables by reference. 
  --- mostly so I could get rid of my library which does that Big Grin 


RE: Events - alkarim - 04-21-2015

Thanks for the tip Wink


RE: Events - InsiteFX - 04-22-2015

Events would need to be added to the CI core, so that the core / loader could also use them.


RE: Events - dmyers - 04-22-2015

Here is a events library (included with the example application) which I created.

https://github.com/dmyers2004/ci-events-example

I plan on releasing a super stripped down version of my basic framework sometime soon but, I figured people could use this now.

I will also cross post this to the libraries section so please don't yell at me!

DMyers