1 | <?php |
||
8 | class AppKernel extends Kernel |
||
9 | { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | private $bundleClasses; |
||
14 | |||
15 | public function __construct($environment, $debug, $bundleClasses = []) |
||
16 | { |
||
17 | parent::__construct($environment, $debug); |
||
18 | $this->bundleClasses = $bundleClasses; |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * {@inheritdoc} |
||
23 | */ |
||
24 | public function registerBundles() |
||
25 | { |
||
26 | $bundlesFile = $this->getRootDir() . '/config/' . $this->getEnvironment() . '/bundles.php'; |
||
27 | if (!file_exists($bundlesFile)) { |
||
28 | throw new \RuntimeException($bundlesFile . ' is missing'); |
||
29 | } |
||
30 | |||
31 | return include $bundlesFile; |
||
32 | } |
||
33 | |||
34 | public function getCacheDir() |
||
35 | { |
||
36 | return sys_get_temp_dir() . '/ddrrestbundle/cache/'; |
||
37 | } |
||
38 | |||
39 | public function getLogDir() |
||
40 | { |
||
41 | return sys_get_temp_dir() . '/ddrrestbundle/logs'; |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public function registerContainerConfiguration(LoaderInterface $loader) |
||
48 | { |
||
49 | $resource = $this->getRootDir() . '/config/' . $this->getEnvironment() . '/config.yml'; |
||
50 | $loader->load($resource); |
||
51 | } |
||
52 | } |
||
53 |