public function __invoke(AppBuilder $appBuilder)
 {
     $bundleService = new BundleService();
     foreach ($appBuilder->getRootBundles() as $bundle) {
         $this->scanBundle($bundle, $bundleService);
     }
     $appBuilder->setBundleService($bundleService);
 }
 public function __invoke(AppBuilder $appBuilder)
 {
     $containerBuilder = new ContainerBuilder();
     $containerBuilder->addDefinitions($appBuilder->getConfigService()->get('php-di'));
     $containerBuilder->addDefinitions([BundleService::class => $appBuilder->getBundleService(), ConfigService::class => $appBuilder->getConfigService()]);
     $container = $containerBuilder->build();
     $container->set(Container::class, $container);
     $appBuilder->setContainer($container);
 }
 private function getEnv(ConfigService $configService, AppBuilder $appBuilder) : string
 {
     $env = 'development';
     if ($appBuilder->isEnvSpecified()) {
         $env = $appBuilder->getEnv();
     } else {
         if ($configService->has('ENVIRONMENT')) {
             $env = $configService->get('ENVIRONMENT');
         }
     }
     return $env;
 }
 public function __invoke(AppBuilder $appBuilder)
 {
     SchemaParams::injectSchemaService($appBuilder->getContainer()->get(SchemaService::class));
 }