24
24
*/
25
25
abstract class MicroKernel extends Kernel
26
26
{
27
+ /**
28
+ * Applies the bundle configuration and calls configureServices() for continued building.
29
+ *
30
+ * @param LoaderInterface $loader
31
+ */
32
+ public function registerContainerConfiguration (LoaderInterface $ loader )
33
+ {
34
+ if (!$ loader instanceof ContainerBuilderAwareLoader) {
35
+ throw new \LogicException ('registerContainerConfiguration requires the LoaderInterface to be a ContainerBuilderAwareLoader. ' );
36
+ }
37
+
38
+ $ this ->configureExtensions ($ loader ->getContainerBuilder (), $ loader ->getResourceLoader ());
39
+ $ this ->configureServices ($ loader ->getContainerBuilder (), $ loader ->getResourceLoader ());
40
+ }
41
+
27
42
/**
28
43
* Configure dependency injection extensions that have been added to the container.
29
44
*
@@ -34,29 +49,18 @@ abstract class MicroKernel extends Kernel
34
49
* @param ContainerBuilder $c
35
50
* @param LoaderInterface $loader
36
51
*/
37
- abstract protected function configureExtensions (ContainerBuilder $ c , LoaderInterface $ loader );
52
+ protected function configureExtensions (ContainerBuilder $ c , LoaderInterface $ loader )
53
+ {
54
+ }
38
55
39
56
/**
40
57
* Add any service definitions to your container.
41
58
*
42
59
* @param ContainerBuilder $c
43
60
* @param LoaderInterface $loader
44
61
*/
45
- abstract protected function configureServices (ContainerBuilder $ c , LoaderInterface $ loader );
46
-
47
- /**
48
- * Applies the bundle configuration and calls configureServices() for continued building.
49
- *
50
- * @param LoaderInterface $loader
51
- */
52
- public function registerContainerConfiguration (LoaderInterface $ loader )
62
+ protected function configureServices (ContainerBuilder $ c , LoaderInterface $ loader )
53
63
{
54
- if (!$ loader instanceof ContainerBuilderAwareLoader) {
55
- throw new \LogicException ('registerContainerConfiguration requires the LoaderInterface to be a ContainerBuilderAwareLoader. ' );
56
- }
57
-
58
- $ this ->configureExtensions ($ loader ->getContainerBuilder (), $ loader ->getResourceLoader ());
59
- $ this ->configureServices ($ loader ->getContainerBuilder (), $ loader ->getResourceLoader ());
60
64
}
61
65
62
66
/**
0 commit comments