*/ class HistoriqueListenerFactory implements FactoryInterface { public function createService(ServiceLocatorInterface $serviceLocator) { return $this->__invoke($serviceLocator, '?'); } public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { /** @var AuthenticationService $authenticationService */ $authenticationService = $container->get('Zend\Authentication\AuthenticationService'); $listener = new HistoriqueListener(); $listener->setAuthenticationService($authenticationService); return $listener; } }