feat : restructuration des dossiers pour implementer plus facilement la suite des WS
This commit is contained in:
@@ -2,31 +2,37 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Malio\EdnotifBundle\Api\BovinApi;
|
||||
use Malio\EdnotifBundle\Api\BovinApiInterface;
|
||||
use Malio\EdnotifBundle\Auth\TokenProvider;
|
||||
use Malio\EdnotifBundle\Soap\SoapClientFactory;
|
||||
use Malio\EdnotifBundle\Bovin\Api\BovinApi;
|
||||
use Malio\EdnotifBundle\Bovin\Api\BovinApiInterface;
|
||||
use Malio\EdnotifBundle\Bovin\Mapper\AnimalFileMapper;
|
||||
use Malio\EdnotifBundle\Shared\Soap\SoapClientFactory;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
|
||||
|
||||
return static function (ContainerConfigurator $container): void {
|
||||
$services = $container->services()
|
||||
->defaults()
|
||||
->autowire()
|
||||
->autoconfigure();
|
||||
->autoconfigure()
|
||||
;
|
||||
|
||||
$services->set(SoapClientFactory::class)
|
||||
->arg('$soapOptions', '%ednotif.soap_options%');
|
||||
->arg('$soapOptions', '%ednotif.soap_options%')
|
||||
;
|
||||
|
||||
// SoapClient Guichet
|
||||
$services->set('ednotif.soap.guichet', SoapClient::class)
|
||||
->factory([service(SoapClientFactory::class), 'create'])
|
||||
->args(['%ednotif.guichet_wsdl%']);
|
||||
->args(['%ednotif.guichet_wsdl%'])
|
||||
;
|
||||
|
||||
// SoapClient Métier
|
||||
$services->set('ednotif.soap.metier', SoapClient::class)
|
||||
$services->set('ednotif.soap.business', SoapClient::class)
|
||||
->factory([service(SoapClientFactory::class), 'create'])
|
||||
->args(['%ednotif.metier_wsdl%']);
|
||||
->args(['%ednotif.metier_wsdl%'])
|
||||
;
|
||||
|
||||
$services->set(AnimalFileMapper::class);
|
||||
|
||||
$services->set(TokenProvider::class)
|
||||
->args([
|
||||
@@ -38,13 +44,18 @@ return static function (ContainerConfigurator $container): void {
|
||||
'%ednotif.password%',
|
||||
'%ednotif.token_ttl_seconds%',
|
||||
service('cache.app'),
|
||||
]);
|
||||
])
|
||||
;
|
||||
|
||||
$services->set(BovinApi::class)
|
||||
->args([
|
||||
service(TokenProvider::class),
|
||||
service('ednotif.soap.metier'),
|
||||
]);
|
||||
service('ednotif.soap.business'),
|
||||
service(AnimalFileMapper::class),
|
||||
'%ednotif.exploitation_country_code%',
|
||||
'%ednotif.exploitation_number%',
|
||||
])
|
||||
;
|
||||
|
||||
$services->alias(BovinApiInterface::class, BovinApi::class)->public();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user