-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggetion about event. #11389
Comments
There's going to be an event manager PSR in the works soon: https://groups.google.com/forum/#!topic/php-fig/MFL__YvumkE |
Here: https://github.com/bretterer/fig-standards/blob/event-manager/proposed/event-manager.md It totally makes sense so I'd adopt it. |
hmm... What |
PSR doesn't force you to name events in any certain way but yes, I guess it would lead to names like |
@mdmunir I like this way ,Laravel's event is implemented |
Reopen old issue #3243. Maybe for 2.1
Event as jquery like
1. Trigger event using
name
orobject
(break BC? yes/no).Currently, to send event object, it must be as as second parameter of
trigger()
. But, event object itself contain name property. Better first parameter can be event name or event object.2. Use
return false;
or$event->stopPropagation()
to stop handling (break BC? no).Currently to stop event handling we use
$event->handled = true
. Prefer usingreturn false
.3. Add extra parameter when trigger event (break BC? no).
The text was updated successfully, but these errors were encountered: