/** * Loads bundles routes into application's router. */ public function loadBundlesRoutes() { $loadedBundles = array_keys($this->container->findTaggedServiceIds('bundle.config')); foreach ($loadedBundles as $serviceId) { $config = $this->container->get($serviceId); $recipes = $this->getLoaderRecipesByConfig($config); $this->loadRoutes($config, $this->getCallbackFromRecipes($recipes, self::ROUTE_RECIPE_KEY)); } }