- $dispatcher = new EventDispatcher();
- $stopWatch = new Stopwatch();
- $tdispatcher = new TraceableEventDispatcher($dispatcher, $stopWatch);
-
- $listener = function () {};
- if ($isWrapped) {
- $listener = new WrappedListener($listener, 'foo', $stopWatch, $dispatcher);
- }
-
- $tdispatcher->addListener('foo', $listener, 5);
+ $tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch());
+ $tdispatcher->addListener('foo', function () {}, 5);