Set the service container to be able to parse parameter and service in config
Resets the compiled parameters array.

@param \BackBee\DependencyInjection\Container $container

@return \BackBee\Config\Config
765868
public function setContainer(Container $container = null)
    {
        $this->container = $container;
        $this->parameters = array();

        return $this;
    }
1153496
public function prepend(ContainerBuilder $container)
    {
        $configs = $container->getExtensionConfig('wizad_settings');

        $processor = new Processor();
        $configuration = $this->getConfiguration($configs, $container);
        $config = $processor->processConfiguration($configuration, $configs);

        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('services.xml');

        // Initialize Settings service
        $this->loadStorageEngine($config, $container);

        // Load settings schema
        $this->loadDynamicParametersSchema($config, $container);

        // Inject parameters
        $container->get('wizad_settings.dependency_injection.container_injection_manager')->inject($container);
    }
895720
protected function setDependencies(Container $container)
    {
        parent::setDependencies($container);

        if (isset($container['config']['templates'])) {
            $this->availableTemplates = $this->parseChoices($container['config']['templates']);
            $this->choices = $this->availableTemplates;
        }
    }
531612
public function register(Container $container)
    {
        $closure = function (Container $container) {
            $tz = $container->get('config')->get('system.timezone', 'UTC');

            return new Chronos('now', new \DateTimeZone($tz));
        };

        $container->set(Chronos::class, $closure);
    }
806052
public function register(Container $container)
    {
        $container->prepareSharedObject(
            EventDispatcher::class,
            function (EventDispatcher $dispatcher, Container $container) {
                $dispatcher->foo = 'bar';

                return $dispatcher->setDebug($container->get('config')->get('system.debug'));
            }
        )->bindShared(Dispatcher::class, EventDispatcher::class)
            ->bindShared(DispatcherInterface::class, EventDispatcher::class);
    }
222101
public function inject(Container $container) : array
    {
        $parameters = $this->arguments;
        foreach ($parameters as &$parameter) {
            $parameter = $this->getParameter($container, $parameter);
        }

        return $parameters;
    }
520711
public function process(ContainerBuilder $container)
    {
        // Now, let's store the registry in the container (an empty version of it... it will be dynamically added at runtime):
        $this->registerRegistry($container);

        $registry = $this->registryProvider->getRegistry($container);

        // Note: in the 'boot' method of a bundle, the container is available.
        // We use that to push the lazy array in the container.
        // The lazy array can be used by the registry that is also part of the container.
        // The registry can itself be used by a factory that creates services!

        $this->registerAcclimatedContainer($container);

        foreach ($registry as $serviceProviderKey => $serviceProvider) {
            $this->registerFactories($serviceProviderKey, $serviceProvider, $container);
        }

        foreach ($registry as $serviceProviderKey => $serviceProvider) {
            $this->registerExtensions($serviceProviderKey, $serviceProvider, $container);
        }
    }
797197
public function setContainer(ContainerInterface $container)
    {
        $application = $this;
        $container->share(ApplicationInterface::class, $application);
        $container->share(\Interop\Container\ContainerInterface::class, $container);

        $this->container = $container;

        return $this;
    }
1096687
public function provideBusinessLayerDependencies(Container $container): Container
    {
        $container = parent::provideBusinessLayerDependencies($container);
        $container = $this->addPriceProductFacade($container);
        $container = $this->addUtilEncodingService($container);

        return $container;
    }
596755
public function register(Container $container)
    {
        $container["tplLoader.service"] = function (Container $container) {
            $loader = new \SlaxWeb\View\Loader\PHP($container["response.service"], $container["logger.service"]());
            return $loader->setTemplateExt($container["config.service"]["view.templateExtension"]);
        };
    }
1140187
public function provideBusinessLayerDependencies(Container $container): Container
    {
        $container = parent::provideBusinessLayerDependencies($container);
        $container = $this->addBrandTransferExpanderPlugins($container);

        return $container;
    }
791862
protected function addUtilEncodingService(Container $container): Container
    {
        $container[static::SERVICE_UTIL_ENCODING] = function (Container $container) {
            return new PriceProductDataImportToUtilEncodingServiceBridge($container->getLocator()->utilEncoding()->service());
        };

        return $container;
    }
873611
public function register(Container $container)
    {
        /** @var Config $configuration */
        $configuration = $container['config'];

        $client = new Client([
            'timeout' => $configuration->timeout,
            'verify' => $configuration->sslVerifyHost,
        ]);

        return $client;
    }
1321203
public function process(ContainerBuilder $container)
    {
        $parameterBag = $container->getParameterBag();

        $parameterReplacer = $container->get(ServiceNames::PARAMETER_REPLACER);

        $parameterReplacer->processParameterBag($parameterBag, $container);
    }
960265
protected function setDependencies(Container $container)
    {
        // Fullfills the DescribableTrait dependencies
        $this->setMetadataLoader($container['metadata/loader']);

        // Fulfills the TranslatorAwareTrait dependencies
        $this->setTranslator($container['translator']);

        // Fulfills the ViewableTrait dependencies
        $this->setView($container['view']);
    }
29573
public function register(ContainerInterface $container)
    {
        if (! isset($container['session'])) {
            $container['session'] = function (ContainerInterface $container) {
                return new Session;
            };
        }

        if (! isset($container['router'])) {
            /**
             * This service MUST return a SHARED instance
             * of Mbh\Interfaces\RouterInterface.
             *
             * @param Container $container
             * @return RouterInterface
             */
            $container['router'] = function (ContainerInterface $container) {
                $routerCacheFile = false;
                if (isset($container->get('settings')['routerCacheFile'])) {
                    $routerCacheFile = $container->get('settings')['routerCacheFile'];
                }

                $router = (new Router)->setCacheFile($routerCacheFile);
                if (method_exists($router, 'setContainer')) {
                    $router->setContainer($container);
                }

                if (method_exists($router, 'setCallableResolver')) {
                    $router->setCallableResolver($container['callableResolver']);
                }

                return $router;
            };
        }
    }
1043797
public function setContainer(ContainerInterface $container = null)
    {
        $this->container = $container;
        if ($container) {
            // Specifically inject translator for tryTranslate method
            $this->translator = $container->get('translator');
        }
    }