feat : restructuration des dossiers pour implementer plus facilement la suite des WS
This commit is contained in:
@@ -7,6 +7,9 @@ namespace Malio\EdnotifBundle\DependencyInjection;
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
|
||||
use const SOAP_SINGLE_ELEMENT_ARRAYS;
|
||||
use const WSDL_CACHE_BOTH;
|
||||
|
||||
final class Configuration implements ConfigurationInterface
|
||||
{
|
||||
public function getConfigTreeBuilder(): TreeBuilder
|
||||
@@ -26,6 +29,9 @@ final class Configuration implements ConfigurationInterface
|
||||
->scalarNode('login')->cannotBeEmpty()->isRequired()->end()
|
||||
->scalarNode('password')->cannotBeEmpty()->isRequired()->end()
|
||||
|
||||
->scalarNode('exploitation_number')->cannotBeEmpty()->isRequired()->end()
|
||||
->scalarNode('exploitation_country_code')->defaultValue('FR')->end()
|
||||
|
||||
->integerNode('token_ttl_seconds')->min(30)->defaultValue(900)->end()
|
||||
|
||||
->arrayNode('soap_options')
|
||||
@@ -34,11 +40,12 @@ final class Configuration implements ConfigurationInterface
|
||||
->booleanNode('trace')->defaultFalse()->end()
|
||||
->booleanNode('exceptions')->defaultTrue()->end()
|
||||
->integerNode('connection_timeout')->min(1)->defaultValue(15)->end()
|
||||
->integerNode('cache_wsdl')->defaultValue(\WSDL_CACHE_BOTH)->end()
|
||||
->integerNode('features')->defaultValue(\SOAP_SINGLE_ELEMENT_ARRAYS)->end()
|
||||
->integerNode('cache_wsdl')->defaultValue(WSDL_CACHE_BOTH)->end()
|
||||
->integerNode('features')->defaultValue(SOAP_SINGLE_ELEMENT_ARRAYS)->end()
|
||||
->end()
|
||||
->end()
|
||||
->end();
|
||||
->end()
|
||||
;
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ final class EdnotifExtension extends Extension
|
||||
public function load(array $configs, ContainerBuilder $container): void
|
||||
{
|
||||
$configuration = new Configuration();
|
||||
|
||||
/** @var array{
|
||||
* guichet_wsdl:string,
|
||||
* metier_wsdl:string,
|
||||
@@ -35,13 +36,16 @@ final class EdnotifExtension extends Extension
|
||||
$container->setParameter('ednotif.zone', $config['zone']);
|
||||
$container->setParameter('ednotif.application', $config['application']);
|
||||
|
||||
$container->setParameter('ednotif.exploitation_number', $config['exploitation_number']);
|
||||
$container->setParameter('ednotif.exploitation_country_code', $config['exploitation_country_code']);
|
||||
|
||||
$container->setParameter('ednotif.login', $config['login']);
|
||||
$container->setParameter('ednotif.password', $config['password']);
|
||||
|
||||
$container->setParameter('ednotif.token_ttl_seconds', $config['token_ttl_seconds']);
|
||||
$container->setParameter('ednotif.soap_options', $config['soap_options']);
|
||||
|
||||
$loader = new PhpFileLoader($container, new FileLocator(__DIR__ . '/../../config'));
|
||||
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../config'));
|
||||
$loader->load('services.php');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user