1 | <?php |
||
12 | class AppKernel extends Kernel |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $config; |
||
18 | |||
19 | /** |
||
20 | * @param string $config |
||
21 | * @throws \RuntimeException |
||
22 | */ |
||
23 | public function __construct($config) |
||
24 | { |
||
25 | parent::__construct('test', true); |
||
26 | |||
27 | $fs = new Filesystem(); |
||
28 | if (!$fs->isAbsolutePath($config)) { |
||
29 | $config = __DIR__ . '/config/' .$config; |
||
30 | } |
||
31 | |||
32 | if (!file_exists($config)) { |
||
33 | throw new \RuntimeException(sprintf('The config file "%s" does not exist.', $config)); |
||
34 | } |
||
35 | |||
36 | $this->config = $config; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return array |
||
41 | */ |
||
42 | public function registerBundles() |
||
52 | |||
53 | /** |
||
54 | * @param LoaderInterface $loader |
||
55 | * @throws \Exception |
||
56 | */ |
||
57 | public function registerContainerConfiguration(LoaderInterface $loader) |
||
61 | |||
62 | /** |
||
63 | * @return string |
||
64 | */ |
||
65 | public function getCacheDir() |
||
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getLogDir() |
||
77 | } |
||
78 |