@param ConfigResolverInterface $configResolver

@return \Symfony\Component\Cache\Adapter\TagAwareAdapterInterface
433276
public function getCachePool(ConfigResolverInterface $configResolver)
    {
        /** @var \Symfony\Component\Cache\Adapter\AdapterInterface $cacheService */
        $cacheService = $this->container->get($configResolver->getParameter('cache_service_name'));

        // If cache service is already implementing TagAwareAdapterInterface, return as-is
        if ($cacheService instanceof TagAwareAdapterInterface) {
            return $cacheService;
        }

        return new TagAwareAdapter(
            $cacheService
        );
    }
1249549
protected function createPager(AdapterInterface $adapter, $currentPage, $maxPerPage, Tag $tag = null)
    {
        if ($adapter instanceof TagAdapterInterface && $tag instanceof Tag) {
            $adapter->setTag($tag);
        }

        $pager = new Pagerfanta($adapter);

        $pager->setNormalizeOutOfRangePages(true);
        $pager->setMaxPerPage($maxPerPage);
        $pager->setCurrentPage($currentPage > 0 ? $currentPage : 1);

        return $pager;
    }
1228148
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $resolver = new AggregateResolver();
        $resolver->attach($serviceLocator->get('GkSmartyTemplateMapResolver'));
        $resolver->attach($serviceLocator->get('GkSmartyTemplatePathStack'));

        return $resolver;
    }
1331748
public function setReadPreference($readPreference, array $tags = null)
    {
        $this->cursor->setReadPreference($readPreference, $tags);
        $this->unitOfWorkHints[Query::HINT_READ_PREFERENCE] = $readPreference;
        $this->unitOfWorkHints[Query::HINT_READ_PREFERENCE_TAGS] = $tags;
        return $this;
    }
1106283
private function getConfigDB(ConfigInterface $config): ConfigInterface
    {
        // get current connection
        $connection = $this->getConnection();
        // Get config of required connection
        $config_db = $config->get($connection);
        try {
            if (null === $config_db) {
                throw new Exception("Connection \"$connection\" is not found in database config");
            }
        } catch (Exception $e) {
            // __constructor
        }
        return $config_db;
    }
801975
public function setReadPreference($readPreference, array $tags = null)
    {
        if ($tags !== null) {
            $this->mongoCursor->setReadPreference($readPreference, $tags);
        } else {
            $this->mongoCursor->setReadPreference($readPreference);
        }

        $this->readPreference = $readPreference;
        $this->readPreferenceTags = $tags;

        return $this;
    }
30518
@Override
    public ConfigResponse<T> getConfigResponse() {
        T config = this.config.get();

        config = withoutDefaultLogin(config);

        if (config instanceof PasswordsConfig<?>) {
            config = ((PasswordsConfig<T>) config).withoutPasswords();
        }

        return new ConfigResponse<>(config, getConfigFileLocation(), configFileLocation);
    }
72678
protected function getConfiguration(InputInterface $input): ConsoleConfigInterface
    {
        // If the configuration to use is the default.
        if ($input->getOption('default')) {
            $this->validatePathsExist($input);
            // If it is a directory.
            if ($input->getOption('dir')) {
                return (new DefaultConsoleConfigFactory())
                    ->invokeDir($input->getArgument('source'), $input->getArgument('target'));
            }
            return (new DefaultConsoleConfigFactory())
                ->invokeFile($input->getArgument('source'), $input->getArgument('target'));
        }

        $path = $input->getOption('config');
        // If we have a "=" at the beginning of the option value
        $path = preg_replace('/^\=/', '', $path);

        $factory = $this->getConfigurationFactory($path);

        if ($input->getOption('dir')) {
            $this->validatePathsExist($input);
            return $factory->invokeDir(
                $path,
                $input->getArgument('source'),
                $input->getArgument('target')
            );
        }
        if ($input->getOption('file')) {
            $this->validatePathsExist($input);
            return $factory->invokeFile(
                $path,
                $input->getArgument('source'),
                $input->getArgument('target')
            );
        }
        return $factory->invoke($path);
    }
780552
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config      = $serviceLocator->get('Config');
        $collections = array();

        if (isset($config['asset_manager']['resolver_configs']['riot-tags'])) {
            $collections = $config['asset_manager']['resolver_configs']['riot-tags'];
        }

        return new RiotTagCollectionResolver($collections, $serviceLocator->get('ViewHelperManager')->get('riotTag'));
    }
962994
public function getGeneratorForModule(ModuleInterface $module)
    {
        $type       = $module->getModularType();
        $collection = $this->getRouteCollectionForType($type);

        if (array_key_exists($type, $this->generators)) {
            return $this->generators[$type];
        }

        if (null === $this->options['cache_dir']) {
            return $this->generators[$type] = new $this->options['generator_class']($collection, $this->context, $this->logger);
        }

        $cacheClass = sprintf('%s_UrlGenerator', $type);

        $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'] . '/' . $cacheClass .'.php',
            function (ConfigCacheInterface $cache) use ($cacheClass, $collection) {
                /** @var GeneratorDumperInterface $dumper */
                $dumper = new $this->options['generator_dumper_class']($collection);

                $options = [
                    'class'      => $cacheClass,
                    'base_class' => $this->options['generator_base_class'],
                ];

                $cache->write($dumper->dump($options), $collection->getResources());
            }
        );

        require_once $cache->getPath();

        return $this->generators[$type] = new $cacheClass($this->context, $this->logger);
    }
1064403
public function createCustomGenerator(DataProviderParserInterface $dataProviderParser): DataProviderGeneratorInterface
    {
        return new DataProviderGenerator(
            $dataProviderParser,
            $this->createFileWriter(),
            $this->getConfig()->getDataProviderNamespace(),
            $this->getConfig()->getDataProviderExtends()
        );
    }
950405
public function import(?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null): DataImporterReportTransfer
    {
        return $this->getFactory()->createCompanyUnitAddressLabelDataImport()->import($dataImporterConfigurationTransfer);
    }
89818
public function getDataProvider(Query $query = null) {
		if(!$this instanceof ReadInterface) {
			throw new InvalidConfigException("Repository " . static::class . " not implements of ReadInterface");
		}
		$query = $this->prepareQuery($query);
		$dataProvider = new ActiveDataProvider([
			'query' => $query,
			'service' => $this,
		]);
		$dataProvider->models = $this->afterReadTrigger($dataProvider->models, $query);
		return $dataProvider;
	}
778546
public function getDefaultYvesControllerSourceAction(GeneratorProjectTypeResolverInterface $typeResolver): string
    {
        if ($typeResolver->isDemoShop()) {
            return $this->getDemoShopDefaultYvesControllerSource();
        }

        return $this->getSuitDefaultYvesControllerSource();
    }
900398
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        return new WorkflowToProcessingConfigTranslator(
            $serviceLocator->get('prooph.link.pm.task_collection'),
            $serviceLocator->get('prooph.link.pm.message_handler_collection'),
            $serviceLocator->get('prooph.link.system_config'),
            $serviceLocator->get('proophessor.command_bus'),
            $serviceLocator->get('prooph.link.app.config_location')
        );
    }
208070
protected function loadDefaultResolverServices($config, LoaderInterface $loader)
    {
        if ('xiidea.easy_audit.default_event_resolver' === $config['resolver']) {
            $loader->load('default/event-resolver.yml');
        }

        if (true === $config['default_logger']) {
            $loader->load('default/logger.yml');
        }

        if (false !== $config['doctrine_objects'] && 'xiidea.easy_audit.default_doctrine_event_resolver' === $config['doctrine_event_resolver']) {
            $loader->load('default/doctrine-event-resolver.yml');
        }
    }
458727
public static function get(CacheItemPoolInterface $pool, RouterInterface $router, array $config)
    {
        if ($config['use_tagging']) {
            $pool = TaggablePSR6PoolAdapter::makeTaggable($pool);
        }

        if (!empty($config['prefix'])) {
            $pool = new PrefixedCachePool($pool, $config['prefix']);
        }

        return new CachingRouter($pool, $router, $config);
    }