Loading src/UnicaenLeocarte/Options/ModuleOptionsFactory.php +7 −7 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace UnicaenLeocarte\Options; use Interop\Container\ContainerInterface; use Zend\ServiceManager\Exception\InvalidArgumentException; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; Loading @@ -13,15 +14,14 @@ use Zend\ServiceManager\ServiceLocatorInterface; */ class ModuleOptionsFactory implements FactoryInterface { /** * Create service * * @param ServiceLocatorInterface $serviceLocator * @return mixed */ public function createService(ServiceLocatorInterface $serviceLocator) { $config = $serviceLocator->get('Configuration'); return $this->__invoke($serviceLocator, '?'); } public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { $config = $container->get('Configuration'); $key = 'unicaen-leocarte'; Loading src/UnicaenLeocarte/Service/Photo/PhotoServiceFactory.php +8 −2 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace UnicaenLeocarte\Service\Photo; use Interop\Container\ContainerInterface; use UnicaenLeocarte\Options\ModuleOptions; use UnicaenLeocarte\Service\Soap\SoapClient; use Zend\ServiceManager\FactoryInterface; Loading @@ -15,12 +16,17 @@ use Zend\ServiceManager\ServiceLocatorInterface; class PhotoServiceFactory implements FactoryInterface { public function createService(ServiceLocatorInterface $serviceLocator) { return $this->__invoke($serviceLocator, '?'); } public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { /** @var ModuleOptions $options */ $options = $serviceLocator->get('UnicaenLeocarte\Options'); $options = $container->get('UnicaenLeocarte\Options'); /** @var SoapClient $soapClient */ $soapClient = $serviceLocator->get('UnicaenLeocarte\Soap\Client'); $soapClient = $container->get('UnicaenLeocarte\Soap\Client'); $service = new PhotoService(); $service->setSoapClient($soapClient); Loading src/UnicaenLeocarte/Service/Soap/SoapClientFactory.php +7 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace UnicaenLeocarte\Service\Soap; use Interop\Container\ContainerInterface; use UnicaenLeocarte\Options\ModuleOptions; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; Loading @@ -14,9 +15,14 @@ use Zend\ServiceManager\ServiceLocatorInterface; class SoapClientFactory implements FactoryInterface { public function createService(ServiceLocatorInterface $serviceLocator) { return $this->__invoke($serviceLocator, '?'); } public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { /** @var ModuleOptions $options */ $options = $serviceLocator->get('UnicaenLeocarte\Options'); $options = $container->get('UnicaenLeocarte\Options'); return new SoapClient($options->getSoapClientConfig()); } Loading Loading
src/UnicaenLeocarte/Options/ModuleOptionsFactory.php +7 −7 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace UnicaenLeocarte\Options; use Interop\Container\ContainerInterface; use Zend\ServiceManager\Exception\InvalidArgumentException; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; Loading @@ -13,15 +14,14 @@ use Zend\ServiceManager\ServiceLocatorInterface; */ class ModuleOptionsFactory implements FactoryInterface { /** * Create service * * @param ServiceLocatorInterface $serviceLocator * @return mixed */ public function createService(ServiceLocatorInterface $serviceLocator) { $config = $serviceLocator->get('Configuration'); return $this->__invoke($serviceLocator, '?'); } public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { $config = $container->get('Configuration'); $key = 'unicaen-leocarte'; Loading
src/UnicaenLeocarte/Service/Photo/PhotoServiceFactory.php +8 −2 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace UnicaenLeocarte\Service\Photo; use Interop\Container\ContainerInterface; use UnicaenLeocarte\Options\ModuleOptions; use UnicaenLeocarte\Service\Soap\SoapClient; use Zend\ServiceManager\FactoryInterface; Loading @@ -15,12 +16,17 @@ use Zend\ServiceManager\ServiceLocatorInterface; class PhotoServiceFactory implements FactoryInterface { public function createService(ServiceLocatorInterface $serviceLocator) { return $this->__invoke($serviceLocator, '?'); } public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { /** @var ModuleOptions $options */ $options = $serviceLocator->get('UnicaenLeocarte\Options'); $options = $container->get('UnicaenLeocarte\Options'); /** @var SoapClient $soapClient */ $soapClient = $serviceLocator->get('UnicaenLeocarte\Soap\Client'); $soapClient = $container->get('UnicaenLeocarte\Soap\Client'); $service = new PhotoService(); $service->setSoapClient($soapClient); Loading
src/UnicaenLeocarte/Service/Soap/SoapClientFactory.php +7 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace UnicaenLeocarte\Service\Soap; use Interop\Container\ContainerInterface; use UnicaenLeocarte\Options\ModuleOptions; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; Loading @@ -14,9 +15,14 @@ use Zend\ServiceManager\ServiceLocatorInterface; class SoapClientFactory implements FactoryInterface { public function createService(ServiceLocatorInterface $serviceLocator) { return $this->__invoke($serviceLocator, '?'); } public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { /** @var ModuleOptions $options */ $options = $serviceLocator->get('UnicaenLeocarte\Options'); $options = $container->get('UnicaenLeocarte\Options'); return new SoapClient($options->getSoapClientConfig()); } Loading