1 | <?php |
||
7 | class AppKernel extends Kernel |
||
8 | { |
||
9 | /** |
||
10 | * For legacy reasons. |
||
11 | * |
||
12 | * @var AppKernel |
||
13 | */ |
||
14 | private static $instance; |
||
15 | |||
16 | /** |
||
17 | * Boots the current kernel. |
||
18 | * |
||
19 | * @return void |
||
20 | */ |
||
21 | public function boot() |
||
22 | { |
||
23 | parent::boot(); |
||
24 | self::$instance = $this; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return array |
||
29 | */ |
||
30 | public function registerBundles() |
||
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | public function getRootDir() |
||
62 | |||
63 | /** |
||
64 | * @return string |
||
65 | */ |
||
66 | public function getCacheDir() |
||
70 | |||
71 | /** |
||
72 | * @return string |
||
73 | */ |
||
74 | public function getLogDir() |
||
78 | |||
79 | /** |
||
80 | * @param \Symfony\Component\Config\Loader\LoaderInterface $loader |
||
81 | * @return void |
||
82 | * @throws \Exception |
||
83 | */ |
||
84 | public function registerContainerConfiguration(LoaderInterface $loader) |
||
88 | |||
89 | /** |
||
90 | * Get instance of AppKernel. |
||
91 | * |
||
92 | * @return AppKernel |
||
93 | */ |
||
94 | public static function getInstance() |
||
95 | { |
||
96 | return self::$instance; |
||
97 | } |
||
98 | |||
99 | /** |
||
100 | * Dependency injection container. |
||
101 | * |
||
102 | * Is not named as getContainer because this is a function of the Kernel. |
||
103 | * It acts as a shortcut for the legacy application to get the container. |
||
104 | * |
||
105 | * @return ContainerInterface |
||
106 | */ |
||
107 | public static function Container() |
||
111 | } |
||
112 |