by Petr Škoda.
Under control === private properties and final methods can do that. Developers can not modify it in any way. Your trigger($event) requires multiple public methods that can be used in wrong or unexpected ways.
In any case the $event->trigger() is fundamental for the legacy event triggering and legacy logging support (see the demo implementation I did). trigger($event) would have to call $event->trigger() anyway to get the legacy stuff done.
If anybody disagrees with $event->trigger() please show us the code and API that would do the trick, but I personally doubt it would be doing better job.
The proposed events+logging design consists of multiple parts, changing of one part (triggering, observers or 1 class per file) would probably break other parts or introduce new unexpected problems. If you want to change something there it is your responsibility to prove it does not break the rest of the proposal.
In any case thanks a lot for your feedback, I agree this needs more discussion.
In any case the $event->trigger() is fundamental for the legacy event triggering and legacy logging support (see the demo implementation I did). trigger($event) would have to call $event->trigger() anyway to get the legacy stuff done.
If anybody disagrees with $event->trigger() please show us the code and API that would do the trick, but I personally doubt it would be doing better job.
The proposed events+logging design consists of multiple parts, changing of one part (triggering, observers or 1 class per file) would probably break other parts or introduce new unexpected problems. If you want to change something there it is your responsibility to prove it does not break the rest of the proposal.
In any case thanks a lot for your feedback, I agree this needs more discussion.