Loading src/UnicaenImport/ORM/Event/Listeners/Factory/EntitySourceInjectorFactory.php +8 −7 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace UnicaenImport\ORM\Event\Listeners\Factory; use Interop\Container\ContainerInterface; use UnicaenImport\Options\ModuleOptions; use UnicaenImport\ORM\Event\Listeners\EntitySourceInjector; use Zend\ServiceManager\FactoryInterface; Loading @@ -10,18 +11,18 @@ use Zend\ServiceManager\ServiceLocatorInterface; final class EntitySourceInjectorFactory implements FactoryInterface { /** * Create service * * @param ServiceLocatorInterface $serviceLocator * * @return EntitySourceInjector * @deprecated */ public function createService(ServiceLocatorInterface $serviceLocator) { return $this->__invoke($serviceLocator, ''); } public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { $service = new EntitySourceInjector(); $service->setOptionsModule($serviceLocator->get(ModuleOptions::class)); $service->setOptionsModule($container->get(ModuleOptions::class)); return $service; } } No newline at end of file Loading
src/UnicaenImport/ORM/Event/Listeners/Factory/EntitySourceInjectorFactory.php +8 −7 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace UnicaenImport\ORM\Event\Listeners\Factory; use Interop\Container\ContainerInterface; use UnicaenImport\Options\ModuleOptions; use UnicaenImport\ORM\Event\Listeners\EntitySourceInjector; use Zend\ServiceManager\FactoryInterface; Loading @@ -10,18 +11,18 @@ use Zend\ServiceManager\ServiceLocatorInterface; final class EntitySourceInjectorFactory implements FactoryInterface { /** * Create service * * @param ServiceLocatorInterface $serviceLocator * * @return EntitySourceInjector * @deprecated */ public function createService(ServiceLocatorInterface $serviceLocator) { return $this->__invoke($serviceLocator, ''); } public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { $service = new EntitySourceInjector(); $service->setOptionsModule($serviceLocator->get(ModuleOptions::class)); $service->setOptionsModule($container->get(ModuleOptions::class)); return $service; } } No newline at end of file