Symfony\Component\HttpKernel\Kernel::initializeContainer PHP Method

initializeContainer() protected method

protected initializeContainer ( )
    protected function initializeContainer()
    {
        $class = $this->getSafeName().ucfirst($this->environment).($this->debug ? 'Debug' : '').'ProjectContainer';
        $location = $this->getCacheDir().'/'.$class;
        $reload = $this->debug ? $this->needsReload($class, $location) : false;

        if ($reload || !file_exists($location.'.php')) {
            $this->buildContainer($class, $location.'.php');
        }

        require_once $location.'.php';

        $container = new $class();
        $container->set('kernel', $this);

        return $container;
    }

Usage Example

Beispiel #1
0
 protected function initializeContainer()
 {
     parent::initializeContainer();
     /** @var SymfonyContainerBridge $rootContainer */
     $rootContainer = $this->getContainer();
     $rootContainer->setFallbackContainer($this->getPHPDIContainer());
 }
All Usage Examples Of Symfony\Component\HttpKernel\Kernel::initializeContainer