Instantiate all configured backends

@param array $configuration
@return BackendInterface[]
@throws \Exception
13032
protected function instantiateBackends(array $configuration)
    {
        $backends = [];
        foreach ($configuration as $backendConfiguration) {
            $class = $backendConfiguration['class'] ?? '';
            $options = $backendConfiguration['options'] ?? [];
            $backends[] = $this->instantiateBackend($class, $options);
        }

        return $backends;
    }
579656
public function writeLocalConfiguration(array $configuration)
    {
        $configuration = $this->configCleaner->cleanConfig($configuration, $this->getMergedLocalConfiguration());
        $this->updateLocalConfiguration($configuration);

        // Too many places require this file to exist, so we make sure to create it
        return $this->configDumper->dumpToFile([], Environment::getLegacyConfigPath() . '/LocalConfiguration.php', "Auto generated by helhum/typo3-config-handling\nDo not edit this file");
    }
54057
static public function getInstance( $configuration = array() )
    {
        if (empty( self::$instance )) {
            self::$instance = new Config( $configuration );
        }
        return self::$instance;
    }
1297368
public function setConfiguration(array $configuration): ConfigurationProviderInterface
    {
        if (isset($configuration['configuration']) && $configuration['configuration']) {
            $configuration = array_merge(
                $configuration,
                $this->load($configuration['configuration']),
                array_filter($configuration)
            );
        }

        $this->configuration = $configuration;

        return $this;
    }
963845
public function addConfiguration(array $configuration)
    {
        $this ->configuration->setParameter(
            'configuration',
            array_merge(
                $this->configuration->getParameter('configuration'),
                $configuration
            )
        );

        return $this;
    }
696862
private function resolveConfiguration(array $configuration, ActionConfiguration $actionConfiguration)
    {
        $resolver = new OptionsResolver();
        $fieldConfiguration = new FieldConfiguration(array_keys($this->fieldsMapping));
        $fieldConfiguration->configureOptions($resolver);
        $fieldConfiguration->setParameters($resolver->resolve($configuration));
        $configuration = $fieldConfiguration->all();

        // For collection of fields, we resolve the configuration of each item
        if ('collection' == $fieldConfiguration->getType()) {
            $items = [];

            foreach ($fieldConfiguration->getOptions() as $itemFieldName => $itemFieldConfiguration) {
                // The configuration should be an array
                if (!$itemFieldConfiguration) {
                    $itemFieldConfiguration = [];
                }

                // The type should be defined
                if (!array_key_exists('type', $itemFieldConfiguration)) {
                    throw new Exception("Missing type configuration for field {$itemFieldName}");
                }

                // The field options are optional
                if (!array_key_exists('options', $itemFieldConfiguration)) {
                    $itemFieldConfiguration['options'] = [];
                }

                // create collection item
                $items[] = $this->create($itemFieldName, $itemFieldConfiguration, $actionConfiguration);
            }
            // add created item to the field options
            $configuration['options'] = [
                'fields' => $items,
            ];
        }

        return $configuration;
    }
944104
public function configure(array $configuration)
    {
        // allows to use the default options when a null value is passed
        if (array_key_exists('options', $configuration) && $configuration['options'] === null) {
            unset($configuration['options']);
        }

        $optionsResolver = new OptionsResolver();
        $optionsResolver
            ->setDefined(['host', 'database', 'options', 'driver_options'])
            ->setDefaults([
                'options' => ['connect' => false],
                'driver_options' => ['typeMap' => ['root' => 'array', 'document' => 'array', 'array' => 'array']],
            ])
            ->setRequired(['host', 'database'])
            ->setAllowedTypes('host', 'string')
            ->setAllowedTypes('database', 'string')
            ->setAllowedTypes('options', 'array')
            ->setAllowedTypes('driver_options', 'array')
        ;

        try {
            $this->configuration = $optionsResolver->resolve($configuration);
        } catch (\Exception $e) {
            throw new NoSQLDriverException('Wrong configuration: '.$e->getMessage(), $e->getCode(), $e);
        }
    }
1213863
public function init($configurations = array())
    {
        $this->parseAndFillConfiguration($configurations);

        $this->included_directories = $this->default_include['directories'];
        $this->included_extensions = $this->default_include['extensions'];
        $this->included_patterns = $this->default_include['patterns'];

        $this->excluded_directories = $this->default_exclude['directories'];
        $this->excluded_files = $this->default_exclude['files'];
        $this->excluded_extensions = $this->default_exclude['extensions'];
        $this->excluded_patterns = $this->default_exclude['patterns'];
        $this->exclude_hidden = $this->default_exclude['hidden'];

        return $this;
    }
1005451
public function createConfiguration(array $options)
    {
        // strip controller options

        $files = $options['files'];
        // if $files is a single object, casting will break it
        if (is_object($files)) {
            $files = array($files);
        } elseif (! is_array($files)) {
            $files = (array)$files;
        }
        unset($options['files']);

        $sources = array();
        foreach ($files as $file) {
            try {
                $sources[] = $this->sourceFactory->makeSource($file);
            } catch (Minify_Source_FactoryException $e) {
                $this->logger->error($e->getMessage());

                return new Minify_ServeConfiguration($options);
            }
        }

        return new Minify_ServeConfiguration($options, $sources);
    }
258093
private function overwriteTemplates(array $configuration): array
    {
        if (isset($this->options['template']) && $this->options['template']) {
            $configuration['phpdocumentor']['templates'] = array_map(
                function ($templateName) {
                    return ['name' => $templateName];
                },
                (array)$this->options['template']
            );
        }

        return $configuration;
    }
62468
public function build(Configuration $configuration)
    {
        if (!$this->filesystem->isCacheFresh()) {
            $container = $this->compile($configuration);
            $this->filesystem->dump($container);
        }

        return $this->containerLoader->loadFrom($configuration->getContainerFilePath());
    }
945215
public function load($source = array())
    {
        $config = new ClientApiConfig();
        try {
            $config->setKey($source['key']);
            $config->setSecret($source['secret']);
            $config->setEndpoint($source['url']);
            $config->setProjectId($source['project_id']);
        } catch (\Exception $e) {
            throw new InvalidConfigException($e->getMessage());
        }

        return $config;
    }
105612
protected function fileFactory(array $configuration): File
	{
		return (new File($this->container->get(FileSystem::class), $configuration['path'], $this->classWhitelist))->setPrefix($configuration['prefix'] ?? '');
	}
767165
public function normalize(ConfigurationInterface $configuration)
    {
        $nodeType = $this->getService()->getNodeType();
        return $this->newInstance($nodeType, array(
            $configuration
        ));
    }
668175
public static function build(array $configuration = []): ?TableColumn
    {
        if (!array_key_exists('type', $configuration)) {
            throw new InvalidConfigException('Configuration for TableColumnFactory is missing "type" key.');
        }

        switch ($configuration['type']) {
            case Schema::TYPE_PK:
                return new TableColumnPK($configuration);

            case Schema::TYPE_UPK:
                return new TableColumnUPK($configuration);

            case Schema::TYPE_BIGPK:
                return new TableColumnBigPK($configuration);

            case Schema::TYPE_UBIGPK:
                return new TableColumnBigUPK($configuration);

            case Schema::TYPE_CHAR:
                return new TableColumnChar($configuration);

            case Schema::TYPE_STRING:
                return new TableColumnString($configuration);

            case Schema::TYPE_TEXT:
                return new TableColumnText($configuration);

            case Schema::TYPE_TINYINT:
                return new TableColumnTinyInt($configuration);

            case Schema::TYPE_SMALLINT:
                return new TableColumnSmallInt($configuration);

            case Schema::TYPE_INTEGER:
                return new TableColumnInt($configuration);

            case Schema::TYPE_BIGINT:
                return new TableColumnBigInt($configuration);

            case Schema::TYPE_BINARY:
                return new TableColumnBinary($configuration);

            case Schema::TYPE_FLOAT:
                return new TableColumnFloat($configuration);

            case Schema::TYPE_DOUBLE:
                return new TableColumnDouble($configuration);

            case Schema::TYPE_DATETIME:
                return new TableColumnDateTime($configuration);

            case Schema::TYPE_TIMESTAMP:
                return new TableColumnTimestamp($configuration);

            case Schema::TYPE_TIME:
                return new TableColumnTime($configuration);

            case Schema::TYPE_DATE:
                return new TableColumnDate($configuration);

            case Schema::TYPE_DECIMAL:
                return new TableColumnDecimal($configuration);

            case Schema::TYPE_BOOLEAN:
                return new TableColumnBoolean($configuration);

            case Schema::TYPE_MONEY:
                return new TableColumnMoney($configuration);

            case Schema::TYPE_JSON:
                return new TableColumnJson($configuration);

            default:
                throw new InvalidConfigException("Unsupported schema type '{$configuration['type']}' for TableColumnFactory.");
        }
    }
1184280
public function configure(\OtherCode\Rest\Core\Configuration $configuration = null)
    {
        if (isset($configuration)) {
            $this->configuration = $configuration;
        } else {
            $this->configuration = new \OtherCode\Rest\Core\Configuration();
        }
        $this->request->setHeaders($this->configuration->httpheader);
        return $this;
    }
998146
private function overrideConfiguration(array $configuration, array $override)
    {
        $configuration['parameters'] = array_replace(
            $configuration['parameters'],
            $override['parameters']
        );

        unset($override['parameters']);

        return array_replace($configuration, $override);
    }