/** * Boots the Bundle. * * @param Symfony\Components\DependencyInjection\ContainerInterface $container A ContainerInterface instance */ public function boot(ContainerInterface $container) { $container->getErrorHandlerService(); // load core classes if ($container->getParameter('kernel.include_core_classes')) { ClassCollectionLoader::load($container->getParameter('kernel.compiled_classes'), $container->getParameter('kernel.cache_dir'), 'classes', $container->getParameter('kernel.debug')); } }
<?php require_once __DIR__ . '/../../UniversalClassLoader.php'; /* * This file is part of the Symfony framework. * * (c) Fabien Potencier <*****@*****.**> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ use Symfony\Framework\UniversalClassLoader; use Symfony\Framework\ClassCollectionLoader; $loader = new UniversalClassLoader(); $loader->registerNamespaces(array('Symfony' => __DIR__ . '/../../../..')); $loader->register(); if (file_exists(__DIR__ . '/../../bootstrap.php')) { unlink(__DIR__ . '/../../bootstrap.php'); } ClassCollectionLoader::load(array('Symfony\\Framework\\Bundle\\Bundle', 'Symfony\\Framework\\Bundle\\BundleInterface', 'Symfony\\Framework\\KernelBundle', 'Symfony\\Framework\\DependencyInjection\\KernelExtension', 'Symfony\\Framework\\Debug\\ErrorHandler', 'Symfony\\Framework\\ClassCollectionLoader', 'Symfony\\Framework\\EventDispatcher'), __DIR__ . '/../..', 'bootstrap', false);
/** * Boots the current kernel. * * This method boots the bundles, which MUST set * the DI container. * * @throws \LogicException When the Kernel is already booted */ public function boot() { if (true === $this->booted) { throw new \LogicException('The kernel is already booted.'); } if (!$this->isDebug()) { require_once __DIR__ . '/bootstrap.php'; } $this->bundles = $this->registerBundles(); $this->bundleDirs = $this->registerBundleDirs(); $this->container = $this->initializeContainer(); // load core classes ClassCollectionLoader::load($this->container->getParameter('kernel.compiled_classes'), $this->container->getParameter('kernel.cache_dir'), 'classes', $this->container->getParameter('kernel.debug'), true); foreach ($this->bundles as $bundle) { $bundle->setContainer($this->container); $bundle->boot(); } $this->booted = true; }