symfony-validator/ValidatorBundle/DependencyInjection/ValidatorExtension.php

35 lines
1.1 KiB
PHP
Raw Permalink Normal View History

2021-07-07 10:26:43 +02:00
<?php
namespace Bluesquare\ValidatorBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Contracts\Translation\TranslatorInterface;
class ValidatorExtension extends Extension
{
/**
* Loads a specific configuration.
*
* @throws \InvalidArgumentException When provided tag is not defined in this extension
*/
public function load(array $configs, ContainerBuilder $container)
{
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Ressources/config'));
$loader->load('services.yaml');
$configuration = $this->getConfiguration($configs, $container);
$config = $this->processConfiguration($configuration, $configs);
return $config;
}
public function getAlias()
{
return parent::getAlias(); // TODO: Change the autogenerated stub
}
}