test
This commit is contained in:
parent
a26c178dbb
commit
75f2bbd173
|
@ -5,4 +5,5 @@ services:
|
||||||
Bluesquare\Validator:
|
Bluesquare\Validator:
|
||||||
class: Bluesquare\ValidatorBundle
|
class: Bluesquare\ValidatorBundle
|
||||||
autowire: true
|
autowire: true
|
||||||
arguments: ['@request_stack']
|
autoconfigure: true
|
||||||
|
arguments: ['@symfony/request-stack']
|
||||||
|
|
|
@ -2,12 +2,16 @@
|
||||||
|
|
||||||
namespace Bluesquare;
|
namespace Bluesquare;
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
|
use Symfony\Component\DependencyInjection\Extension\Extension;
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
use Symfony\Component\HttpFoundation\RequestStack;
|
use Symfony\Component\HttpFoundation\RequestStack;
|
||||||
|
use Symfony\Component\HttpKernel\Config\FileLocator;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
use Traversable;
|
use Traversable;
|
||||||
|
|
||||||
class ValidatorBundle
|
class ValidatorBundle extends Extension
|
||||||
{
|
{
|
||||||
protected $request;
|
protected $request;
|
||||||
protected $context;
|
protected $context;
|
||||||
|
@ -440,4 +444,15 @@ class ValidatorBundle
|
||||||
$words = array_map('ucfirst', explode('_', $string));
|
$words = array_map('ucfirst', explode('_', $string));
|
||||||
return implode('', $words);
|
return implode('', $words);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue