Creates and returns a new instance of ``Container`` after adding
``$config`` to it.

@param array $config

@return ContainerInterface
486185
public function createContainer(array $config)
    {
        $container = new Container();
        $container->add('config.raw', $config);
        $this->setContainer($container);
        return $this->getContainer();
    }
751413
public function getConfiguration(array $config, ContainerBuilder $container)
    {
        $configuration = new Configuration($this->getMainConfigParser(), $this->suggestionCollector);
        $configuration->setSiteAccessConfigurationFilters($this->siteaccessConfigurationFilters);

        return $configuration;
    }
1361271
public function buildContainer(
        ExtensionInterface $extension = null,
        array $config = [],
        array $parameters = [],
        array $compilerPasses = []
    ) {
        $container = new ContainerBuilder();
        if ($extension !== null) {
            $extension->setConfigDirectories($this->configDirectories);
            $extension->buildContainer($container, $config);
        }
        foreach ($parameters as $key => $value) {
            $container->setParameter($key, $value);
        }
        foreach ($compilerPasses as $compilerPass) {
            $container->addCompilerPass($compilerPass);
        }
        $container->compile();

        return $container;
    }
358476
public static function instance($config = [])
    {
        if (null === self::$instance) {
            self::$instance = new static($config);
        }

        return self::$instance;
    }
937724
public function replace(array $config) : ConfigInterface
    {
        foreach ($config as $key => $configuration) {
            $this->set($key, $configuration);
        }

        return $this;
    }
419789
public function containerStart($container, $config = array())
    {
        return $this->postJson(
            $this->uri->expand(
                '/containers/{container}/start',
                array(
                    'container' => $container
                )
            ),
            $config
        )->then(array($this->parser, 'expectEmpty'));
    }
258725
protected function createApcDriver(array $config)
    {
        $prefix = $this->getPrefix($config);

        return $this->repository(new ApcStore(new ApcWrapper, $prefix));
    }
1270328
public function make(array $config): ProfileBuilder
    {
        $config = $this->getConfig($config);

        return $this->getProfileBuilder($config);
    }
395823
public function renderContainer( $config = [] ) {

		$containerView = CodeGenUtil::isAbsolutePath( $this->containerView, true ) ? $this->containerView : "$this->template/$this->containerView";

		return $this->render( $containerView, [ 'widget' => $this ] );
	}
1182272
public function make(array $config)
    {
        Arr::requires($config, ['token']);

        $client = new Client();

        return new HipchatGateway($client, $config);
    }
1207757
protected function createPdoResolverWithHosts(array $config)
    {
        return function () use ($config) {
            foreach (Arr::shuffle($hosts = $this->parseHosts($config)) as $key => $host) {
                $config['host'] = $host;

                try {
                    return $this->createConnector($config)->connect($config);
                } catch (PDOException $e) {
                    continue;
                }
            }

            throw $e;
        };
    }
1129655
public function getConfiguration(array $config, ContainerBuilder $container)
    {
        $reflection = new \ReflectionClass(Configuration::class);
        $container->addResource(new FileResource($reflection->getFileName()));

        return new Configuration();
    }
449673
public static function getInstance($config = array())
    {
        static $instance;

        if ($instance === null) {
            if (!$config instanceof AnConfig) {
                $config = new AnConfig($config);
            }

            $instance = new self($config);
        }

        return $instance;
    }
1110482
public function load(array $config)
    {
        $config = $this->getParsedConfig(
            $config,
            $this->config,
            $this->yamlConfigMap,
            $this->required
        );
        $this->setParsedConfig($config);

        return $this;
    }
879648
public function make(array $configArr) : ContainerInterface
    {
        $this->container = $this->initObjectWithCheck(
            $configArr['serviceContainer'],
            ContainerInterface::class,
            $this->makeConstructParams($configArr['serviceContainer'])
        );

        $this->registerServices($configArr['services']);
        $this->setConfigToConfiguratorService($configArr);
        
        return $this->container;
    }
985771
public function loadInternal(array $config, ContainerBuilder $container)
    {
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('services.yml');

        $bundles = $container->getParameter('kernel.bundles');

        $directories = [];
        if ($config['metadata']['auto_detection']) {
            foreach ($bundles as $name => $class) {
                $ref                                   = new \ReflectionClass($class);
                $directories[$ref->getNamespaceName()] = dirname($ref->getFileName()) . '/Resources/config/fixture';
            }
        }

        foreach ($config['metadata']['directories'] as $directory) {
            $directory['path'] = rtrim(str_replace('\\', '/', $directory['path']), '/');
            if ('@' === $directory['path'][0]) {
                preg_match('~^@([a-z0-9_]+)~i', $directory['path'], $match);

                if (isset($match[1])) {
                    list($prefixedBundleName, $bundleName) = $match;
                    if (!isset($bundles[$bundleName])) {
                        throw new RuntimeException(sprintf('The bundle "%s" has not been registered with AppKernel. Available bundles: %s', $bundleName, implode(', ', array_keys($bundles))));
                    }
                    $ref = new \ReflectionClass($bundles[$bundleName]);
                    $directory['path'] = dirname($ref->getFileName()).substr($directory['path'], strlen($prefixedBundleName));
                }
            }
            $directories[rtrim($directory['namespace_prefix'], '\\')] = rtrim($directory['path'], '\\/');
        }

        $container
            ->getDefinition('trappar_alice_generator.metadata.file_locator')
            ->addArgument($directories);

        $container
            ->getDefinition(YamlWriter::class)
            ->addArgument($config['yaml']['inline'])
            ->addArgument($config['yaml']['indent']);

        $container
            ->getDefinition(ValueVisitor::class)
            ->addArgument($config['strictTypeChecking']);
    }
1193688
public static function create(array $config)
    {
        if (\Tripod\Config::getConfig() !== $config) {
            \Tripod\Config::setConfig($config);
        }
        if (isset($config['class']) && class_exists($config['class'])) {
            $tripodConfig = call_user_func(array($config['class'], 'deserialize'), $config);
        } else {
            $tripodConfig = \Tripod\Mongo\Config::deserialize($config);
        }
        return $tripodConfig;
    }