| @@ 12-26 (lines=15) @@ | ||
| 9 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
| 10 | use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; |
|
| 11 | ||
| 12 | final class PHWebhookExtension extends AbstractResourceExtension |
|
| 13 | { |
|
| 14 | /** |
|
| 15 | * {@inheritdoc} |
|
| 16 | */ |
|
| 17 | public function load(array $config, ContainerBuilder $container) |
|
| 18 | { |
|
| 19 | $config = $this->processConfiguration($this->getConfiguration([], $container), $config); |
|
| 20 | $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 21 | ||
| 22 | $this->registerResources('ph', $config['driver'], $config['resources'], $container); |
|
| 23 | ||
| 24 | $loader->load('forms.yml'); |
|
| 25 | } |
|
| 26 | } |
|
| 27 | ||
| @@ 17-33 (lines=17) @@ | ||
| 14 | * |
|
| 15 | * @see http://symfony.com/doc/current/cookbook/bundles/extension.html |
|
| 16 | */ |
|
| 17 | final class PHCoreExtension extends AbstractResourceExtension |
|
| 18 | { |
|
| 19 | /** |
|
| 20 | * {@inheritdoc} |
|
| 21 | */ |
|
| 22 | public function load(array $configs, ContainerBuilder $container) |
|
| 23 | { |
|
| 24 | $configuration = new Configuration(); |
|
| 25 | $config = $this->processConfiguration($configuration, $configs); |
|
| 26 | ||
| 27 | $this->registerResources('ph', $config['driver'], [], $container); |
|
| 28 | ||
| 29 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 30 | $loader->load('services.yml'); |
|
| 31 | $loader->load('listeners.yml'); |
|
| 32 | } |
|
| 33 | } |
|
| 34 | ||