symfony/EventDispatcher — pull request #1 by msabramo (2012-04-04 15:13:21+00:00)
Title: Add support for setting and getting the originator of an event

The "originator" is the object and/or file and line number of the code that
called EventDispatcher::dispatch

This could be useful for debugging although my original motivation for
this is that in my project I want the listener to be able to find out
about objects that it otherwise wouldn't know about, because the objects
are created after the listener is attached.

In my specific example, I am creating for our proprietary MVC framework a debug toolbar much like Symfony's and I need a listener that is called when a view is rendered and I need that listener to be able to find out the view object that dispatched the event. This allows me to do that without subclassing Event.