-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add support for something like EventObject in dispatchEvent method #76
Comments
On the first look, I really like the idea, but I'm not sure if there aren't any non-obviouse design issues with it (with usage of the pattern). |
+1 Maybe |
I can see one problem. The EVM would hold a map like (edit) Solution: |
+1 for the idea, events can be more than just data. Great move towards OOP. |
It is on the programmer to decide whether to use objects or simple arrays. Otherwise we would still use the fastest plain PHP.. :) |
+1 |
@enumag actually, EVM already considers inheritance. |
@fprochazka I know but that's for listeners, this is different. |
+1 |
I would love to implement this, but it would be out-of-scope. #97 (comment) |
I would like to use something similar to
$em->dispatchEvent(new App\Events\StartupEvent(...))
instead of$em->dispatchEvent('app.startup', ...)
. Because this way i dont have to remeber exact "string" name of the event and what parameters/arguments i need.It also may be easily implemented to dispatchEvent method:
What do you think about it?
The text was updated successfully, but these errors were encountered: