[FrameworkBundle] make the code more generic

This commit is contained in:
Fabien Potencier 2011-12-01 08:44:53 +01:00
parent 308ac83945
commit 342def5bfe

View File

@ -106,11 +106,7 @@ class TraceableEventDispatcher extends ContainerAwareEventDispatcher implements
$this->called[$eventName.'.'.$info['pretty']] = $info;
$name = isset($info['class'])
? substr($info['class'], strrpos($info['class'], '\\') + 1)
: 'Closure';
$e2 = $this->stopwatch->start($name, 'event_listener');
$e2 = $this->stopwatch->start(isset($info['class']) ? substr($info['class'], strrpos($info['class'], '\\') + 1) : $info['type'], 'event_listener');
call_user_func($listener, $event);