| @@ 19-39 (lines=21) @@ | ||
| 16 | * | |
| 17 | * @package Nnx\DoctrineFixtureModule\FilterUsedFixtureService | |
| 18 | */ | |
| 19 | class FilterUsedFixtureServiceFactory implements FactoryInterface | |
| 20 | { | |
| 21 | ||
| 22 | ||
| 23 | /** | |
| 24 | * @inheritDoc | |
| 25 | * | |
| 26 | * | |
| 27 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException | |
| 28 | * @throws \Nnx\DoctrineFixtureModule\Utils\Exception\RuntimeException | |
| 29 | */ | |
| 30 | public function createService(ServiceLocatorInterface $serviceLocator) | |
| 31 |     { | |
| 32 | $appServiceLocator = $serviceLocator instanceof AbstractPluginManager ? $serviceLocator->getServiceLocator() : $serviceLocator; | |
| 33 | ||
| 34 | /** @var ManagerRegistryProviderInterface $managerRegistryProvider */ | |
| 35 | $managerRegistryProvider = $appServiceLocator->get(ManagerRegistryProviderInterface::class); | |
| 36 | ||
| 37 | return new FilterUsedFixtureService($managerRegistryProvider); | |
| 38 | } | |
| 39 | } | |
| 40 | ||
| @@ 19-41 (lines=23) @@ | ||
| 16 | * | |
| 17 | * @package Nnx\DoctrineFixtureModule\FixtureInitializer | |
| 18 | */ | |
| 19 | class ConnectionRegistryEventSubscriberFactory | |
| 20 | implements FactoryInterface | |
| 21 | { | |
| 22 | ||
| 23 | /** | |
| 24 | * @param ServiceLocatorInterface $serviceLocator | |
| 25 | * | |
| 26 | * @return ConnectionRegistryEventSubscriber|mixed | |
| 27 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException | |
| 28 | * @throws \Nnx\DoctrineFixtureModule\Utils\Exception\RuntimeException | |
| 29 | */ | |
| 30 | public function createService(ServiceLocatorInterface $serviceLocator) | |
| 31 |     { | |
| 32 | $appServiceLocator = $serviceLocator instanceof AbstractPluginManager ? $serviceLocator->getServiceLocator() : $serviceLocator; | |
| 33 | ||
| 34 | ||
| 35 | /** @var ManagerRegistryProviderInterface $managerRegistryProvider */ | |
| 36 | $managerRegistryProvider = $appServiceLocator->get(ManagerRegistryProviderInterface::class); | |
| 37 | $managerRegistry = $managerRegistryProvider->getManagerRegistry(); | |
| 38 | ||
| 39 | return new ConnectionRegistryEventSubscriber($managerRegistry); | |
| 40 | } | |
| 41 | } | |
| 42 | ||
| @@ 19-42 (lines=24) @@ | ||
| 16 | * | |
| 17 | * @package Nnx\DoctrineFixtureModule\FixtureInitializer | |
| 18 | */ | |
| 19 | class ManagerRegistryEventSubscriberFactory | |
| 20 | implements FactoryInterface | |
| 21 | { | |
| 22 | ||
| 23 | ||
| 24 | /** | |
| 25 | * @param ServiceLocatorInterface $serviceLocator | |
| 26 | * | |
| 27 | * @return ManagerRegistryEventSubscriber|mixed | |
| 28 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException | |
| 29 | * @throws \Nnx\DoctrineFixtureModule\Utils\Exception\RuntimeException | |
| 30 | */ | |
| 31 | public function createService(ServiceLocatorInterface $serviceLocator) | |
| 32 |     { | |
| 33 | $appServiceLocator = $serviceLocator instanceof AbstractPluginManager ? $serviceLocator->getServiceLocator() : $serviceLocator; | |
| 34 | ||
| 35 | /** @var ManagerRegistryProviderInterface $managerRegistryProvider */ | |
| 36 | $managerRegistryProvider = $appServiceLocator->get(ManagerRegistryProviderInterface::class); | |
| 37 | $managerRegistry = $managerRegistryProvider->getManagerRegistry(); | |
| 38 | ||
| 39 | ||
| 40 | return new ManagerRegistryEventSubscriber($managerRegistry); | |
| 41 | } | |
| 42 | } | |
| 43 | ||