@@ 19-34 (lines=16) @@ | ||
16 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; |
|
17 | use Symfony\Component\DependencyInjection\Loader; |
|
18 | ||
19 | class DPCoreExtension extends Extension |
|
20 | { |
|
21 | /** |
|
22 | * {@inheritDoc} |
|
23 | */ |
|
24 | public function load(array $configs, ContainerBuilder $container) |
|
25 | { |
|
26 | $configuration = new Configuration(); |
|
27 | $config = $this->processConfiguration($configuration, $configs); |
|
28 | ||
29 | $container->setParameter('dedipanel.version', $config['version'] ?: '0.0.0'); |
|
30 | ||
31 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
32 | $loader->load('services.yml'); |
|
33 | } |
|
34 | } |
|
35 |
@@ 24-41 (lines=18) @@ | ||
21 | * |
|
22 | * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} |
|
23 | */ |
|
24 | class DPMachineExtension extends Extension |
|
25 | { |
|
26 | /** |
|
27 | * {@inheritDoc} |
|
28 | */ |
|
29 | public function load(array $configs, ContainerBuilder $container) |
|
30 | { |
|
31 | $configuration = new Configuration(); |
|
32 | $config = $this->processConfiguration($configuration, $configs); |
|
33 | ||
34 | if (isset($config['private_keys_path'])) { |
|
35 | $container->setParameter('dedipanel.key_store.file.path', $config['private_keys_path']); |
|
36 | } |
|
37 | ||
38 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
39 | $loader->load('services.yml'); |
|
40 | } |
|
41 | } |
|
42 |