@param ConfigRepository $config

@return string
334039
public function build($config)
    {
        $builder = new UrlQueryBuilder();
        $builder->setModule('API');
        $builder->setMethod($this->method);
        if ($this->usePeriod) {
            $period = $config->get(Option::PERIOD);
            $builder->setDate($this->getDate($period));
        }
        $builder->setSiteId($this->getSiteId($config));
        $formatOverride = $this->getFormat($config);
        if (!is_null($formatOverride)) {
            $builder->setFormat($this->validateFormat($formatOverride));
        }
        $builder->setTokenAuth($this->getTokenAuth($config));
        $builder->addAll($this->flattenArray($this->arguments));

        return $builder->build();
    }
1114058
public static function fromConfig(Config $config)
    {
        $message = sprintf(
            'Could not instantiate OptionRepository from Config with starting key "%1$s".',
            empty($config->getKeys())
                ? '<none>'
                : $config->getKeys()[0]
        );

        return new static($message);
    }
44397
private function handleRepositoryConfig($config)
    {
        $count = 0;
        if (is_array($config) && array_key_exists('repositories', $config)) {
            foreach ($config['repositories'] as $repoName => $repoConf) {
                $repoConf = $this->configurator->resolveRepositoryConfig($repoConf);
                $repository = $this->addRepository($repoName, $repoConf['path'], $repoConf['options'], $repoConf['commands']);
                ++$count;

                // adding branches
                if (array_key_exists('branch', $repoConf)) {
                    foreach ($repoConf['branch'] as $branchName => $branchOptions) {
                        $branchOptions = $this->configurator->resolveBranchConfig($branchOptions);
                        $repository->addBranch($branchName, $branchOptions['commands'], $branchOptions['path'], $branchOptions['options']);
                    }
                }
            }
        }

        return $count;
    }
162763
private static function prepareStorage($config)
    {
        $list = isset($config['storage']) ? $config['storage'] : [];
        $list = is_array($list) ? $list : [$list];
        $query = PropertyStorage::find()->select('id')->where('class_name=:className');
        if (count($list) == 0) {
            return [$query->params([':className' => StaticValues::class])->scalar() => StaticValues::class];
        }
        $storage = [];
        foreach ($list as $storageClass) {
            $storageId = PropertyStorage::getDb()->cache(
                function ($db) use ($storageClass, $query) {
                    return $query
                        ->params([':className' => $storageClass])
                        ->scalar($db);
                },
                86400,
                new TagDependency(['tags' => [PropertyStorage::commonTag()]])
            );
            if (false === $storageId) {
                continue;
            }
            $storage[$storageId] = $storageClass;
        }
        return $storage;
    }
318368
protected function getOptionsFromConfig(Config $config)
    {
        $options = $this->options;

        if ($visibility = $config->get('visibility')) {
            // For local reference
            $options['visibility'] = $visibility;
            // For external reference
            $options['ACL'] = $visibility === AdapterInterface::VISIBILITY_PUBLIC ? 'public-read' : 'private';
        }

        if ($mimetype = $config->get('mimetype')) {
            // For local reference
            $options['mimetype'] = $mimetype;
            // For external reference
            $options['ContentType'] = $mimetype;
        }

        foreach (static::$metaOptions as $option) {
            if ( ! $config->has($option)) {
                continue;
            }
            $options[$option] = $config->get($option);
        }

        return $options;
    }
1248031
public function getFormat($config)
    {
        $result = $this->format;
        if ($this->useFormat) {
            $result = $config->get(Option::FORMAT);
        }

        return $result;
    }
330499
protected function getDSN(Array $config)
    {
        $dsn = "pgsql:host={$config['host']};dbname={$config['dbname']}";

        if (isset($config['port'])) {
            $dsn .= ";port={$config['port']}";
        }

        if (isset($config['sslmode'])) {
            $dsn .= ";sslmode={$config['sslmode']}";
        }

        return $dsn;
    }
1118766
private function getPrefix(Config $config)
    {
        $parts = explode(':', $config->name);
        if ($config->parent && 2 === count($parts)) {
            // nested route that contains 'App:*
            array_shift($parts);
        }

        return strtolower(str_replace(array('/', '\\', ':'), '_', implode('_', $parts)));
    }
1276425
private function getPrefix(Config $config)
    {
        $parts = explode(':', $config->getPrefix());
        array_shift($parts);

        return strtolower(str_replace(array('/', '\\'), '_', implode('_', $parts)));
    }
235561
protected function createClientOptions(ConfigRepository $config): ClientOptions
    {
        $preview               = $config->get('contentful.preview');
        $defaultLocale         = $config->get('contentful.default_locale');
        $lowMemoryResourcePool = $config->get('contentful.low_memory_resource_pool');

        $clientOptions = new ClientOptions();

        if ($preview === true) {
            $clientOptions->usingPreviewApi();
        }

        if ($defaultLocale !== null) {
            $clientOptions->withDefaultLocale($defaultLocale);
        }

        if ($lowMemoryResourcePool === true) {
            $clientOptions->withLowMemoryResourcePool();
        }

        return $clientOptions;
    }
893505
protected function buildConnectionString(array $config): string
    {
        if (isset($config['connection_string'])) {
            return $config['connection_string'];
        }

        $result = 'mongodb://';

        // If username is present, append "<username>:<password>@"
        if (isset($config['username'])) {
            $result .= sprintf(
                '%s:%s@',
                $config['username'],
                $config['password'] ?? ''
            );
        }

        // Append "<hostname>/<database>"
        $result .= sprintf(
            '%s/%s',
            $this->buildHostname($config),
            $config['database'] ?? 'mongolid'
        );

        if (isset($config['cluster']['replica_set'])) {
            $result .= '?replicaSet='.$config['cluster']['replica_set'];
        }

        return $result;
    }
39895
public function generateKey($config)
    {
        return $config->version . ',' . // possibly replace with function calls
               $config->getBatchSerial($this->type) . ',' .
               $config->get($this->type . '.DefinitionRev');
    }
685869
public function parseFuelConfig(array $config)
	{
		$params = array();

		$params['driver'] = $config['type'];

		if ($params['driver'] === 'pdo')
		{
			list($type, $dsn) = explode(':', $config['connection']['dsn'], 2);

			$params['driver'] .= '_' . $type;

			$dsn = explode(';', $dsn);

			foreach ($dsn as $d)
			{
				list($k, $v) = explode('=', $d);

				$params[$k] = $v;
			}
		}
		else
		{
			$params['dbname'] = $config['connection']['database'];
			$params['host'] = $config['connection']['hostname'];
			$params['port'] = Arr::get($config, 'connection.port');
		}

		$params['user'] = Arr::get($config, 'connection.username');
		$params['password'] = Arr::get($config, 'connection.password');
		$params['charset'] = Arr::get($config, 'charset');

		return $params;
	}
943453
protected function getODMCompilerPass(array $config)
    {
        $nameSpace = 'Gesdinet\JWTRefreshTokenBundle\Document';
        $mappings = array(
            realpath(dirname(__DIR__, 2).'/Resources/config/mongodb/doctrine-mongodb') => $nameSpace,
        );

        if (isset($config['refresh_token_class']) || isset($config['refresh_token_entity'])) {
            $mappings[realpath(dirname(dirname(__DIR__)).'/Resources/config/mongodb/doctrine-superclass')] = $nameSpace;
        } else {
            $mappings[realpath(dirname(dirname(__DIR__)).'/Resources/config/mongodb/doctrine-document')] = $nameSpace;
        }

        return DoctrineMongoDBMappingsPass::createYamlMappingDriver($mappings, array());
    }
1358321
protected function parseDescriptorField($config)
    {
        if (is_array($config)) {
            $descriptor = [];
            foreach ($config as $field) {
                if (!empty($this->{$field})) {
                    $descriptor[] = $this->{$field};
                }
            }

            return implode(' ', $descriptor);
        } else {
            return $this->{$config};
        }
    }
337346
public function getModelRepository($config = null, $data = null)
    {
        return new Repository\ModelRepository($this->getRequest(), $config, $data);
    }
1282443
public static function get($config = []) {
        $key = md5(get_called_class() . serialize($config));
        if (!isset(self::$_instances[$key]))
            self::$_instances[$key] = new static($config);
        return self::$_instances[$key];
    }