SetupAppKernel.php (1471B)
1 <?php 2 3 use Symfony\Component\Config\Loader\LoaderInterface; 4 use Symfony\Component\HttpKernel\Kernel; 5 6 /** 7 * This is a special stripped-down kernel which is used during setup. 8 */ 9 class SetupAppKernel extends Kernel 10 { 11 public function registerBundles() 12 { 13 // Base 3rd party bundles required for PartKeepr operation 14 $bundles = [ 15 new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), 16 new Symfony\Bundle\SecurityBundle\SecurityBundle(), 17 new Symfony\Bundle\TwigBundle\TwigBundle(), 18 new Symfony\Bundle\MonologBundle\MonologBundle(), 19 new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), 20 new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), 21 new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), 22 ]; 23 24 // Developer bundles 25 if (in_array($this->getEnvironment(), ['dev', 'test'])) { 26 $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); 27 $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); 28 $bundles[] = new Liip\FunctionalTestBundle\LiipFunctionalTestBundle(); 29 } 30 31 $bundles[] = new \PartKeepr\SetupBundle\PartKeeprSetupBundle(); 32 33 return $bundles; 34 } 35 36 public function registerContainerConfiguration(LoaderInterface $loader) 37 { 38 $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); 39 } 40 }