environment; } public function getLogDir(): string { return dirname(__DIR__).'/var/log'; } public function registerBundles() { $contents = require dirname(__DIR__).'/config/bundles.php'; foreach ($contents as $class => $envs) { if (isset($envs['all']) || isset($envs[$this->environment])) { yield new $class(); } } } protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader) { $confDir = dirname(__DIR__).'/config'; $loader->load($confDir.'/packages/*'.self::CONFIG_EXTS, 'glob'); if (is_dir($confDir.'/packages/'.$this->environment)) { $loader->load($confDir.'/packages/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob'); } $loader->load($confDir.'/services'.self::CONFIG_EXTS, 'glob'); $loader->load($confDir.'/services_'.$this->environment.self::CONFIG_EXTS, 'glob'); } protected function configureRoutes(RouteCollectionBuilder $routes) { $confDir = dirname(__DIR__).'/config'; if (is_dir($confDir.'/routes/')) { $routes->import($confDir.'/routes/*'.self::CONFIG_EXTS, '/', 'glob'); } if (is_dir($confDir.'/routes/'.$this->environment)) { $routes->import($confDir.'/routes/'.$this->environment.'/**/*'.self::CONFIG_EXTS, '/', 'glob'); } $routes->import($confDir.'/routes'.self::CONFIG_EXTS, '/', 'glob'); } }