Commit 81bafcc6 authored by Fabien Potencier's avatar Fabien Potencier

reverted code

parent 66d71daa
...@@ -88,13 +88,6 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe ...@@ -88,13 +88,6 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
$this['dispatcher'] = $this->share(function () use ($app) { $this['dispatcher'] = $this->share(function () use ($app) {
$dispatcher = new EventDispatcher(); $dispatcher = new EventDispatcher();
$app['dispatcher.configure']($dispatcher);
return $dispatcher;
});
$this['dispatcher.configure'] = $app->protect(function ($dispatcher) use ($app) {
$dispatcher->addSubscriber($app); $dispatcher->addSubscriber($app);
$urlMatcher = new LazyUrlMatcher(function () use ($app) { $urlMatcher = new LazyUrlMatcher(function () use ($app) {
...@@ -102,6 +95,8 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe ...@@ -102,6 +95,8 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
}); });
$dispatcher->addSubscriber(new RouterListener($urlMatcher, $app['request_context'], $app['logger'])); $dispatcher->addSubscriber(new RouterListener($urlMatcher, $app['request_context'], $app['logger']));
$dispatcher->addSubscriber(new LocaleListener($app['locale'], $urlMatcher)); $dispatcher->addSubscriber(new LocaleListener($app['locale'], $urlMatcher));
return $dispatcher;
}); });
$this['resolver'] = $this->share(function () use ($app) { $this['resolver'] = $this->share(function () use ($app) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment