1 | <?php |
||
13 | final class InnmindRestClientExtension extends Extension |
||
14 | { |
||
15 | /** |
||
16 | * {@inheritdoc} |
||
17 | */ |
||
18 | 5 | public function load(array $configs, ContainerBuilder $container) |
|
19 | { |
||
20 | 5 | $loader = new Loader\YamlFileLoader( |
|
21 | 5 | $container, |
|
22 | 5 | new FileLocator(__DIR__.'/../Resources/config') |
|
23 | ); |
||
24 | 5 | $loader->load('services.yml'); |
|
25 | 5 | $config = $this->processConfiguration( |
|
26 | 5 | new Configuration, |
|
27 | 5 | $configs |
|
28 | ); |
||
29 | |||
30 | $this |
||
31 | 4 | ->configureLogLevel($config, $container) |
|
32 | 4 | ->configureCacheDirectory($config, $container) |
|
33 | 4 | ->registerTypes($config['types'], $container) |
|
34 | 4 | ->registerContentTypeFormats($config['content_type'], $container); |
|
35 | 4 | } |
|
36 | |||
37 | 4 | private function configureLogLevel( |
|
49 | |||
50 | 4 | private function configureCacheDirectory( |
|
62 | |||
63 | 4 | private function registerTypes(array $types, ContainerBuilder $container): self |
|
78 | |||
79 | 4 | private function registerContentTypeFormats( |
|
89 | } |
||
90 |