|
| 1 | +<?php |
| 2 | + |
| 3 | +require_once __DIR__.'/../src/autoload.php'; |
| 4 | + |
| 5 | +use Symfony\Component\HttpKernel\Kernel; |
| 6 | +use Symfony\Component\DependencyInjection\Loader\LoaderInterface; |
| 7 | + |
| 8 | +class phpBBKernel extends Kernel |
| 9 | +{ |
| 10 | + public function registerRootDir() |
| 11 | + { |
| 12 | + return __DIR__; |
| 13 | + } |
| 14 | + |
| 15 | + public function registerBundles() |
| 16 | + { |
| 17 | + $bundles = array( |
| 18 | + new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), |
| 19 | + |
| 20 | + // enable third-party bundles |
| 21 | + new Symfony\Bundle\ZendBundle\ZendBundle(), |
| 22 | + new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), |
| 23 | + new Symfony\Bundle\DoctrineBundle\DoctrineBundle(), |
| 24 | + //new Symfony\Bundle\DoctrineMigrationsBundle\DoctrineMigrationsBundle(), |
| 25 | + //new Symfony\Bundle\DoctrineMongoDBBundle\DoctrineMongoDBBundle(), |
| 26 | + //new Symfony\Bundle\PropelBundle\PropelBundle(), |
| 27 | + //new Symfony\Bundle\TwigBundle\TwigBundle(), |
| 28 | + |
| 29 | + // register your bundles |
| 30 | + //new Application\HelloBundle\HelloBundle(), |
| 31 | + ); |
| 32 | + |
| 33 | + if ($this->isDebug()) { |
| 34 | + $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); |
| 35 | + } |
| 36 | + |
| 37 | + return $bundles; |
| 38 | + } |
| 39 | + |
| 40 | + public function registerBundleDirs() |
| 41 | + { |
| 42 | + return array( |
| 43 | + 'Application' => __DIR__.'/../src/Application', |
| 44 | + 'Bundle' => __DIR__.'/../src/Bundle', |
| 45 | + 'Symfony\\Bundle' => __DIR__.'/../src/vendor/symfony/src/Symfony/Bundle', |
| 46 | + ); |
| 47 | + } |
| 48 | + |
| 49 | + public function registerContainerConfiguration(LoaderInterface $loader) |
| 50 | + { |
| 51 | + // use YAML for configuration |
| 52 | + // comment to use another configuration format |
| 53 | + //$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); |
| 54 | + |
| 55 | + // uncomment to use XML for configuration |
| 56 | + //$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.xml'); |
| 57 | + |
| 58 | + // uncomment to use PHP for configuration |
| 59 | + $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.php'); |
| 60 | + } |
| 61 | +} |
0 commit comments