| @@ 44-61 (lines=18) @@ | ||
| 41 | * @return void |
|
| 42 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
|
| 43 | */ |
|
| 44 | protected function init(ServiceLocatorInterface $serviceLocator) |
|
| 45 | { |
|
| 46 | if ($this->isInit) { |
|
| 47 | return null; |
|
| 48 | } |
|
| 49 | ||
| 50 | $appServiceLocator = $serviceLocator; |
|
| 51 | if ($serviceLocator instanceof AbstractPluginManager) { |
|
| 52 | $appServiceLocator = $serviceLocator->getServiceLocator(); |
|
| 53 | } |
|
| 54 | ||
| 55 | /** @var ModuleOptionsPluginManagerInterface $moduleOptionsPluginManager */ |
|
| 56 | $moduleOptionsPluginManager = $appServiceLocator->get(ModuleOptionsPluginManagerInterface::class); |
|
| 57 | /** @var ModuleOptions $moduleOptions */ |
|
| 58 | $this->moduleOptions = $moduleOptionsPluginManager->get(ModuleOptions::class); |
|
| 59 | ||
| 60 | $this->isInit = true; |
|
| 61 | } |
|
| 62 | ||
| 63 | ||
| 64 | /** |
|
| @@ 51-71 (lines=21) @@ | ||
| 48 | * |
|
| 49 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
|
| 50 | */ |
|
| 51 | protected function initFactory(ServiceLocatorInterface $serviceLocator) |
|
| 52 | { |
|
| 53 | if (true === $this->isInit) { |
|
| 54 | return; |
|
| 55 | } |
|
| 56 | ||
| 57 | $appServiceLocator = $serviceLocator; |
|
| 58 | if ($serviceLocator instanceof AbstractPluginManager) { |
|
| 59 | $appServiceLocator = $serviceLocator->getServiceLocator(); |
|
| 60 | } |
|
| 61 | ||
| 62 | /** @var ModuleOptionsPluginManagerInterface $moduleOptionsPluginManager */ |
|
| 63 | $moduleOptionsPluginManager = $appServiceLocator->get(ModuleOptionsPluginManagerInterface::class); |
|
| 64 | /** @var ModuleOptions $moduleOptions */ |
|
| 65 | $moduleOptions = $moduleOptionsPluginManager->get(ModuleOptions::class); |
|
| 66 | ||
| 67 | $this->fixtureFilterConfig = $moduleOptions->getFilters(); |
|
| 68 | ||
| 69 | ||
| 70 | $this->isInit = true; |
|
| 71 | } |
|
| 72 | ||
| 73 | ||
| 74 | /** |
|
| @@ 47-67 (lines=21) @@ | ||
| 44 | * |
|
| 45 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
|
| 46 | */ |
|
| 47 | protected function initFactory(ServiceLocatorInterface $serviceLocator) |
|
| 48 | { |
|
| 49 | if (true === $this->isInit) { |
|
| 50 | return; |
|
| 51 | } |
|
| 52 | ||
| 53 | $appServiceLocator = $serviceLocator; |
|
| 54 | if ($serviceLocator instanceof AbstractPluginManager) { |
|
| 55 | $appServiceLocator = $serviceLocator->getServiceLocator(); |
|
| 56 | } |
|
| 57 | ||
| 58 | /** @var ModuleOptionsPluginManagerInterface $moduleOptionsPluginManager */ |
|
| 59 | $moduleOptionsPluginManager = $appServiceLocator->get(ModuleOptionsPluginManagerInterface::class); |
|
| 60 | /** @var ModuleOptions $moduleOptions */ |
|
| 61 | $moduleOptions = $moduleOptionsPluginManager->get(ModuleOptions::class); |
|
| 62 | ||
| 63 | $this->fixtureLoaderConfig = $moduleOptions->getFixturesLoaders(); |
|
| 64 | ||
| 65 | ||
| 66 | $this->isInit = true; |
|
| 67 | } |
|
| 68 | ||
| 69 | ||
| 70 | /** |
|