Create an appender helper service
@param ServiceLocatorInterface $serviceLocator
@return SnippetHelper
483552
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $snippetHelper = new SnippetHelper();

        // Get the top level service locator
        $serviceManager = $serviceLocator;
        if ($serviceManager instanceof HelperPluginManager) {
            $serviceManager = $serviceManager->getServiceLocator();
        }

        if (!$serviceManager->has('Config')) {
            return $snippetHelper;
        }


        $config = $serviceManager->get('Config');

        $snippetsConfig = isset($config[$this->configKey]) ? $config[$this->configKey] : [];

        if (!isset($snippetsConfig['snippets'])) {
            return $snippetHelper;
        }

        $snippets = $snippetsConfig['snippets'];


        if (!is_array($snippets)) {
            return $snippetHelper;
        }

        return $this->configureSnippetHelper($snippetHelper, $config, $snippetsConfig);

    }
148016
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');

        $service = new ModuleOptions($config['e4wzfcuserredirecturl']);
        return $service;
    }
1158894
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $pdfRenderer = $serviceLocator->get(PdfRenderer::class);
        $pdfStrategy = new PdfStrategy($pdfRenderer);
        
        return $pdfStrategy;
    }
157696
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $context = new RequestContext();
        $context->fromRequest($serviceLocator->get('Request'));

        return $context;
    }
454749
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config             = $serviceLocator->get('config');
        $sessionOptions     = $config['uthando_session_manager']['options'] ?? [];
        $options            = new SessionOptions($sessionOptions);

        return $options;
    }
1219417
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $appConfig = $serviceLocator;
        $config = array_key_exists($appConfig['view_helper_date']) ? $appConfig['view_helper_date'] : array();
        if (array_key_exists('formats', $config)) {
            $this->addFormats($config['formats']);
        }
    }
621151
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        return \Prooph\Link\Application\Model\ProcessingConfig::asProjectionFrom($serviceLocator->get('prooph.link.app.config_location'));
    }
1009370
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $service = new AvailablePuppetModuleCacheManager();

        /** @var PuppetModule $puppetModuleService */
        $puppetModuleService = $serviceLocator->get('KmbPmProxy\Service\PuppetModule');
        $service->setPuppetModuleService($puppetModuleService);

        return $service;
    }
445682
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $widgetAction = new ServerTabContentWidgetAction();

        /** @var Node $nodeService */
        $nodeService = $serviceLocator->get('KmbPuppet\Service\Node');
        $widgetAction->setNodeService($nodeService);

        /** @var Group $groupService */
        $groupService = $serviceLocator->get('KmbPuppet\Service\Group');
        $widgetAction->setGroupService($groupService);

        return $widgetAction;
    }
1216068
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $this->getConfig($serviceLocator);

        if (!isset($config['cache'])) {
            return null;
        }

        $config = $config['cache'];
        /* @var $cache CacheProvider|Cache */
        $cache = null;
        $cacheFactory = $this->getCacheFactory($config);
        $cache = $cacheFactory->newInstance($config);

        if (isset($config['namespace'])) {
            $cache->setNamespace(trim($config['namespace']));
        }

        return $cache;
    }
452531
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');
        $config = $config['EddieJaoude\Zf2Logger'];
        $this->logger = new Logger();

        $this->configuration($config);
        $this->writerCollection($config);
        $this->execute();

        return $this->logger;
    }
249105
public function createService( ServiceLocatorInterface $serviceLocator )
    {
        // Configure the definitions
        $config     = $serviceLocator->get( 'Configuration' );
        $coreConfig = isset( $config['modules']['Grid\Core'] )
                    ? (array) $config['modules']['Grid\Core']
                    : array();

        return new EnabledList(
            isset( $coreConfig['enabledPackages'] )
                ? (array) $coreConfig['enabledPackages']
                : array(),
            isset( $coreConfig['modifyPackages'] )
                ? (bool) $coreConfig['modifyPackages']
                : true
        );
    }
657371
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $appServiceLocator = $serviceLocator;
        if ($serviceLocator instanceof AbstractPluginManager) {
            $appServiceLocator = $serviceLocator->getServiceLocator();
        }

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

        $resolverByModuleContextMap = new ResolverByClassName($moduleOptionsPluginManager);

        return $resolverByModuleContextMap;
    }
288422
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $appConfig = $serviceLocator->get('config');
        $config = array_key_exists('log', $appConfig) ? $appConfig['log'] : array();
        $class = array_key_exists('class', $config) ? $config['class'] : 'Zend\Log\Logger';
        $logger = new $class($config);
        return $logger;
    }
439696
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('config');
        $config = new GuardLoaderConfig($config['guard']['instance_loader']);
        $loader = new InstanceLoader($config);

        return $loader;
    }
566337
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $serviceLocator = $serviceLocator->getServiceLocator();
        $helper = new GlobalMessenger();
        $controllerPluginManager = $serviceLocator->get('ControllerPluginManager');
        $globalMessenger = $controllerPluginManager->get('globalMessenger');
        $helper->setPluginGlobalMessenger($globalMessenger);
        $config = $serviceLocator->get('Config');
        if (isset($config['view_helper_config']['flashmessenger'])) {
            $configHelper = $config['view_helper_config']['flashmessenger'];
            if (isset($configHelper['message_open_format'])) {
                $helper->setMessageOpenFormat($configHelper['message_open_format']);
            }
            if (isset($configHelper['message_separator_string'])) {
                $helper->setMessageSeparatorString($configHelper['message_separator_string']);
            }
            if (isset($configHelper['message_close_string'])) {
                $helper->setMessageCloseString($configHelper['message_close_string']);
            }
        }

        return $helper;
    }
329032
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        if ($serviceLocator instanceof AbstractPluginManager) {
            $serviceLocator = $serviceLocator->getServiceLocator() ?: $serviceLocator;
        }

        return $this->create($serviceLocator);
    }