Exemple #1
0
 /**
  * Executes loading of bundle's routes into application's front controller.
  *
  * @param Config        $config
  * @param callable|null $recipe
  */
 private function loadRoutes(Config $config, callable $recipe = null)
 {
     if (false === $this->runRecipe($config, $recipe)) {
         $route = $config->getRouteConfig();
         if (true === is_array($route) && 0 < count($route)) {
             $this->application->getController()->registerRoutes($this->generateBundleServiceId($this->getBundleIdByBaseDir($config->getBaseDir())), $route);
         }
     }
 }