Устанавливает набор утилит для запуска сервисов workflow

@param ServiceUtilInterface $serviceUtil

@return $this
547345
public function setServiceUtil(ServiceUtilInterface $serviceUtil)
    {
        $this->serviceUtil = $serviceUtil;
        $this->serviceUtilClassName = get_class($serviceUtil);

        return $this;
    }
400732
public function createService(ServiceLocatorInterface $controllerManager)
    {
        /* @var ControllerManager $controllerManager*/
        $serviceManager = $controllerManager->getServiceLocator();

        return $this->__invoke($serviceManager, null);
    }
465558
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        if ($serviceLocator instanceof AbstractPluginManager) {
            $serviceLocator = $serviceLocator->getServiceLocator() ?: $serviceLocator;
        }
        return $this($serviceLocator, Asset::class);
    }
411472
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $caller = false;
        $appSm = method_exists($serviceLocator, 'getServiceLocator') ? call_user_func([$serviceLocator, 'getServiceLocator']) : null;
        if ($appSm && $appSm->has('Application')) {
            /** @var Application $app */
            $app = $appSm->get('Application');
            $callerEvent = new CallerEvent();
            $app->getEventManager()->trigger(CallerEvent::EVENT_RESOLVE_CALLER, $callerEvent);
            if ($callerEvent->getCaller()) {
                $caller = $callerEvent->getCaller();
            }
        }

        $w = new BasicWorkflow($caller);

        return $w;
    }
955666
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        if ($serviceLocator instanceof ServiceLocatorAwareInterface) {
            $serviceLocator = $serviceLocator->getServiceLocator();
        }
        /** @var ServiceLocatorInterface $domainManager */
        $domainManager = $serviceLocator->get('MamuzBlog\DomainManager');

        /** @var \MamuzBlog\Crypt\AdapterInterface $cryptEngine */
        $cryptEngine = $domainManager->get('MamuzBlog\Crypt\HashIdAdapter');

        return new HashId($cryptEngine);
    }
1328339
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var ServiceManager $serviceManager */
        $serviceManager = $serviceLocator->getServiceLocator();

        $controller = new ReportsController();

        /** @var EnvironmentRepositoryInterface $environmentRepository */
        $environmentRepository = $serviceManager->get('EnvironmentRepository');
        $controller->setEnvironmentRepository($environmentRepository);

        return $controller;
    }
1299556
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $workflowServiceManager = $serviceLocator->get(Manager::class);

        /** @var Module $module */
        $module = $serviceLocator->get(Module::class);
        $metadataReaderManager = $module->getMetadataReaderManager();

        /** @var ModuleOptions $moduleOptions */
        $moduleOptions = $serviceLocator->get(ModuleOptions::class);

        $metadataReaderName = $moduleOptions->getMetadataReader();
        $metadataReaderOptions = $moduleOptions->getMetadataReaderOptions();
        $metadataReader = $metadataReaderManager->get($metadataReaderName, $metadataReaderOptions, false);

        $options = [
            'serviceManager' => $workflowServiceManager,
            'metadataReader' => $metadataReader
        ];

        return new ServiceTypeResolver($options);
    }
526331
public function createService(ServiceLocatorInterface $elements)
    {
        $services = $elements->getServiceLocator();
        /* @var $options FormOptionsInterface */
        $options = $services->get(ModuleOptions::class);

        $creationOptions = $options->toArray();
        $creationOptions['label'] = 'Sign in';

        // Use submit button by default
        if (!isset($creationOptions['use_submit_element'])) {
            $creationOptions['use_submit_element'] = true;
        }

        return new Login('login-form', $creationOptions);
    }
812710
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var DoctrineObjectManagerInterface $doctrineObjectManager */
        $doctrineObjectManager = $serviceLocator->get(DoctrineObjectManagerInterface::class);

        /** @var ModuleOptionsPluginManagerInterface $moduleOptionsPluginManager */
        $moduleOptionsPluginManager = $serviceLocator->get(ModuleOptionsPluginManagerInterface::class);

        /** @var EntityManagerInterface $entityManager */
        $entityManager = $serviceLocator->get(EntityManagerInterface::class);

        return new EntityMapBuilder($doctrineObjectManager, $moduleOptionsPluginManager, $entityManager);
    }
757218
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $manager = parent::createService($serviceLocator);
        if ($serviceLocator instanceof ServiceManager) {
            $manager->addPeeringServiceManager($serviceLocator);
        }

        return  $manager;
    }
747557
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $services = $serviceLocator->getServiceLocator();
        /* @var $options ModuleOptionsInterface */
        $options = $services->get(ModuleOptions::class);
        $element = new Money('money');
        return $element;
    }
688795
public function createService(ServiceLocatorInterface $elements)
    {
        $parentLocator = $elements->getServiceLocator();

        /* @var $options InputFilterOptionsInterface */
        $options = $parentLocator->get(ModuleOptions::class);

        return new Login($options);
    }
798482
public function webservice(WebserviceInterface $webservice = null)
    {
        if ($webservice === null) {
            return $this->_webservice;
        }

        $this->_webservice = $webservice;

        return $this;
    }
560875
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var Manager $workflowServiceManager */
        $workflowServiceManager = $serviceLocator->get(Manager::class);
        $chainResolver = $serviceLocator->get(ChainTypeResolver::class);
        $serviceResolver = $serviceLocator->get(ServiceTypeResolver::class);

        $options = [
            InjectTypeResolver::WORKFLOW_SERVICE_MANAGER => $workflowServiceManager,
            InjectTypeResolver::CHAIN_TYPE_RESOLVER => $chainResolver,
            InjectTypeResolver::SERVICE_TYPE_RESOLVER => $serviceResolver
        ];

        return new InjectTypeResolver($options);
    }
636022
public function init(ServiceLocatorInterface $serviceLocator)
    {
        if (true === $this->isInit) {
            return;
        }

        $appServiceLocator = $serviceLocator;
        if ($serviceLocator instanceof AbstractPluginManager) {
            $appServiceLocator = $serviceLocator->getServiceLocator();
        }

        /** @var ModuleOptionsPluginManagerInterface $moduleOptionsManager */
        $moduleOptionsManager = $appServiceLocator->get(ModuleOptionsPluginManagerInterface::class);
        /** @var ModuleOptionsInterface $moduleOptions */
        $moduleOptions = $moduleOptionsManager->get(ModuleOptionsInterface::class);
        $this->setModuleOptions($moduleOptions);

        /** @var DoctrineOrmModuleConfigInterface $doctrineOrmModuleConfig */
        $doctrineOrmModuleConfig = $appServiceLocator->get(DoctrineOrmModuleConfigInterface::class);

        $listObjectManagerName = $doctrineOrmModuleConfig->getListObjectManagerName();

        /** @var EntityMapCacheInterface $entityMapCache */
        $entityMapCache = $appServiceLocator->get(EntityMapCacheInterface::class);

        $excludeEntityManagerForAutoBuildEntityMap = $moduleOptions->getExcludeEntityManagerForAutoBuildEntityMap();
        foreach ($listObjectManagerName as $objectManagerName) {
            $flagBuildCache = !in_array($objectManagerName, $excludeEntityManagerForAutoBuildEntityMap, true)
                && $moduleOptions->getFlagAutoBuildEntityMapDoctrineCache()
                && !$entityMapCache->hasEntityMap($objectManagerName);

            if ($flagBuildCache) {
                $entityMapCache->saveEntityMap($objectManagerName);
                if (!$entityMapCache->hasEntityMap($objectManagerName)) {
                    $errMsg = sprintf('Invalid build entity map for: %s', $objectManagerName);
                    throw new Exception\ErrorBuildEntityMapCacheException($errMsg);
                }
            }

            if ($entityMapCache->hasEntityMap($objectManagerName)) {
                $this->objectManagerToEntityMap[$objectManagerName] = $entityMapCache->loadEntityMap($objectManagerName);
            }
        }

        $this->countObjectManagers = count($this->objectManagerToEntityMap);

        if (1 === $this->countObjectManagers) {
            reset($this->objectManagerToEntityMap);
            $this->baseEntityMap = current($this->objectManagerToEntityMap);
        }

        $this->isInit = true;
    }
1319332
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $service = new Environment();

        /** @var EnvironmentRepositoryInterface $environmentRepository */
        $environmentRepository = $serviceLocator->get('EnvironmentRepository');
        $service->setEnvironmentRepository($environmentRepository);

        return $service;
    }
115106
public function setEventManager(EventManagerInterface $events)
    {
        $events->setIdentifiers(array(
            __CLASS__,
            get_class($this),
        ));
        $events->attach(new OperationAnnotationsListener());
        $events->attach(new ServiceAnnotationsListener());
        $this->events = $events;
        return $this;
    }