odiseoteam /
OdiseoBlogBundle
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Odiseo\BlogBundle\DependencyInjection; |
||
| 6 | |||
| 7 | use Sylius\Bundle\ResourceBundle\DependencyInjection\Extension\AbstractResourceExtension; |
||
| 8 | use Symfony\Component\Config\FileLocator; |
||
| 9 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
| 10 | use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @author Diego D'amico <[email protected]> |
||
| 14 | */ |
||
| 15 | final class OdiseoBlogExtension extends AbstractResourceExtension |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * {@inheritdoc} |
||
| 19 | */ |
||
| 20 | public function load(array $config, ContainerBuilder $container): void |
||
| 21 | { |
||
| 22 | $config = $this->processConfiguration($this->getConfiguration([], $container), $config); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 23 | $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
||
| 24 | |||
| 25 | $this->registerResources('odiseo_blog', $config['driver'], $config['resources'], $container); |
||
| 26 | |||
| 27 | $configFiles = [ |
||
| 28 | 'services.yml', |
||
| 29 | ]; |
||
| 30 | |||
| 31 | foreach ($configFiles as $configFile) { |
||
| 32 | $loader->load($configFile); |
||
| 33 | } |
||
| 34 | } |
||
| 35 | } |
||
| 36 |