저자: Fabien Potencier (fabien.potencier@symfony-project.com)
상속: extends Symfony\Component\HttpKernel\Bundle\Bundle
 protected function getRawContainer()
 {
     $container = new ContainerBuilder();
     $security = new SecurityExtension();
     $container->registerExtension($security);
     $bundle = new SecurityBundle();
     $bundle->build($container);
     $container->getCompilerPassConfig()->setOptimizationPasses(array());
     $container->getCompilerPassConfig()->setRemovingPasses(array());
     return $container;
 }
예제 #2
0
 protected function getContainer($file)
 {
     if (isset(self::$containerCache[$file])) {
         return self::$containerCache[$file];
     }
     $container = new ContainerBuilder();
     $security = new SecurityExtension();
     $container->registerExtension($security);
     $bundle = new SecurityBundle();
     $bundle->build($container);
     // Attach all default factories
     $this->loadFromFile($container, $file);
     $container->getCompilerPassConfig()->setOptimizationPasses(array());
     $container->getCompilerPassConfig()->setRemovingPasses(array());
     $container->compile();
     return self::$containerCache[$file] = $container;
 }