From ca70a351fdff760fd53e0a292beab8dfa003f83c Mon Sep 17 00:00:00 2001 From: Drak Date: Sat, 10 Mar 2012 16:07:55 +0545 Subject: [PATCH] [FrameworkBundle] Return Event --- .../Bundle/FrameworkBundle/ContainerAwareEventDispatcher.php | 2 +- .../FrameworkBundle/Debug/TraceableEventDispatcher.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/ContainerAwareEventDispatcher.php b/src/Symfony/Bundle/FrameworkBundle/ContainerAwareEventDispatcher.php index b88625870e..0ce875bcee 100644 --- a/src/Symfony/Bundle/FrameworkBundle/ContainerAwareEventDispatcher.php +++ b/src/Symfony/Bundle/FrameworkBundle/ContainerAwareEventDispatcher.php @@ -164,7 +164,7 @@ class ContainerAwareEventDispatcher extends EventDispatcher { $this->lazyLoad($eventName); - parent::dispatch($eventName, $event); + return parent::dispatch($eventName, $event); } public function getContainer() diff --git a/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php b/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php index c2116ea663..d198fc9308 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php +++ b/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php @@ -47,6 +47,9 @@ class TraceableEventDispatcher extends ContainerAwareEventDispatcher implements $this->called = array(); } + /** + * {@inheritdoc} + */ public function dispatch($eventName, Event $event = null) { switch ($eventName) { @@ -87,6 +90,8 @@ class TraceableEventDispatcher extends ContainerAwareEventDispatcher implements $this->updateProfile($token); break; } + + return $event; } /**