for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @link https://github.com/nnx-framework/doctrine-fixture-module
* @author Malofeykin Andrey <[email protected]>
*/
namespace Nnx\DoctrineFixtureModule\Controller;
use Nnx\DoctrineFixtureModule\Executor\FixtureExecutorManagerInterface;
use Zend\ServiceManager\AbstractPluginManager;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
* Class ExecutorControllerFactory
*
* @package Nnx\DoctrineFixtureModule\Entity
class ExecutorControllerFactory implements FactoryInterface
{
* @inheritDoc
* @return ExecutorController
* @throws \Zend\ServiceManager\Exception\ServiceNotFoundException
public function createService(ServiceLocatorInterface $serviceLocator)
$appServiceLocator = $serviceLocator;
if ($serviceLocator instanceof AbstractPluginManager) {
$appServiceLocator = $serviceLocator->getServiceLocator();
}
/** @var FixtureExecutorManagerInterface $fixtureExecutorManager */
$fixtureExecutorManager = $appServiceLocator->get(FixtureExecutorManagerInterface::class);
return new ExecutorController($fixtureExecutorManager);