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

Correction factory oubliée pour ZF3.

parent 336f34cd
Loading
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -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