register(new SetupMiddlewareProvider()); } protected function createExceptionHandler(Application $app) { return new PhraseaExceptionHandlerSubscriber($app['phraseanet.exception_handler']); } protected function bindRoutes(Application $app) { $app->before($app['setup.validate-config'], Application::EARLY_EVENT); $app->bindRoutes(); } protected function getDispatcherSubscribersFor(Application $app) { $subscribers = [ new BridgeExceptionSubscriber($app), new FirewallSubscriber(), new JsonRequestSubscriber(), ]; return array_merge(parent::getDispatcherSubscribersFor($app), $subscribers); } }