Welcome Guest, Not a member yet? Register   Sign In
Poll: Hooks -> events?
You do not have permission to vote in this poll.
Yes
85.71%
30 85.71%
No
2.86%
1 2.86%
Maybe
11.43%
4 11.43%
Total 35 vote(s) 100%
* You voted for this item. [Show Results]

Events
#1

(This post was last modified: 04-22-2015, 06:16 AM by gadelat.)

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

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 
Reply
#3

Thanks for the tip Wink
Reply
#4

Events would need to be added to the CI core, so that the core / loader could also use them.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

(This post was last modified: 04-23-2015, 04:42 AM by dmyers.)

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
Reply




Theme © iAndrew 2016 - Forum software by © MyBB