Commit 6e5e6895 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction factory oubliée pour ZF3.

parent 336f34cd
Pipeline #4044 failed with stage
in 11 seconds
......@@ -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;
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment