Inject dependencies from a DI Container.

@param Container $container A dependencies container instance.
@return void
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']);
    }
217618
public function provideBusinessLayerDependencies(Container $container)
    {
        $container = parent::provideBusinessLayerDependencies($container);

        $container = $this->addMerchantRelationshipSalesOrderThresholdFacade($container);
        $container = $this->addMerchantRelationshipFacade($container);
        $container = $this->addStoreFacade($container);
        $container = $this->addCurrencyFacade($container);

        return $container;
    }
952248
public function inject(ContainerBuilder $container)
    {
        foreach ($this->schema as $parameter) {

            $value = $parameter['default'];

            if ($this->parametersStorage->has($parameter['key'])) {
                $value = $this->parametersStorage->get($parameter['key']);
            }

            $container->setParameter($this->getParametersName($parameter['key']), $this->protectParameterValue($value));
        }
    }
521863
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        /**
         * Adds compiler pass.
         */
        $container
            ->addCompilerPass(new MappingCompilerPass())
            ->addCompilerPass(new ContextCompilerPass())
            ->addCompilerPass(new ExpressionLanguageCompilerPass());
    }
612454
protected function setupContainer(Container $container)
    {
        $this->container = $container;

        if (! $this->container->bound('config')) {
            $this->container->instance('config', new Fluent);
        }
    }
1100781
private function addShellFacade(DependencyContainerInterface $container): DependencyContainerInterface
    {
        $container[self::SHELL_FACADE] = function (DependencyContainerInterface $container) {
            return $container->getLocator()->shell()->facade();
        };

        return $container;
    }
1206524
protected function setDependencies(Container $container)
    {
        parent::setDependencies($container);

        $this->setBaseUrl($container['base-url']);
        $this->setCollectionLoader($container['model/collection/loader']);
    }
848346
protected function injectPackages(ContainerInterface $container)
	{
		foreach ($this->getPackages() as $package) {
			$package->inject($container);
		}
	}
563114
protected function setupContainer(Container $container=null)
    {
        $this->container = $container ?? $this->container ?? new Container;

        $prefix= $this->getAbstractPrefix();

        if (! $this->container->bound( $prefix.'config')) {
            $this->container->instance( $prefix .'config', new Repository);
        }

        $this->config=$this->container->make( $prefix . 'config');
    }
665123
public function process(ContainerBuilder $container): void
    {
        $this->injectParameters($container);

        $handlerDefinition = new Definition(UdpHandler::class, [
            '%service_bus.logger.graylog.udp_host%',
            '%service_bus.logger.graylog.udp_port%',
            '%service_bus.logger.graylog.gzip%',
            '%service_bus.logger.graylog.log_level%',
        ]);

        $container->addDefinitions([UdpHandler::class => $handlerDefinition]);

        (new LoggerCompilerPass())->process($container);

        $loggerDefinition = $container->getDefinition('service_bus.logger');

        $loggerDefinition->addMethodCall(
            'pushHandler',
            [new Reference(UdpHandler::class)]
        );
    }
59911
protected function registerProviders(Container $container): void
    {
        foreach (self::$providers as $className) {
            $container->addServiceProvider($className);
        }
    }
311417
public function register(Container $container)
    {
        $config = $container->get('config')->get('cache');

        $container->add('cache', new CachePool($config));

        unset($config);
    }
340977
private function addDockerFacade(DependencyContainerInterface $container): DependencyContainerInterface
    {
        $container[self::DOCKER_FACADE] = function(DependencyContainerInterface $container) {
            return $container->getLocator()->dockerClient()->facade();
        };

        return $container;
    }
219464
protected function setDependencies(Container $container)
    {
        parent::setDependencies($container);

        // Satisfies HttpAwareTrait dependencies
        $this->setHttpRequest($container['request']);

        $this->setSecondaryMenuGroupFactory($container['secondary-menu/group/factory']);
    }
824423
public function provideServiceLayerDependencies(Container $container): Container
    {
        $container = parent::provideServiceLayerDependencies($container);

        $container = $this->addConditionalAvailabilitySkuSearchQueryPlugin($container);
        $container = $this->addConditionalAvailabilitySkuSearchQueryExpanderPlugins($container);
        $container = $this->addConditionalAvailabilitySkuSearchQueryFormatterPlugins($container);
        $container = $this->addConditionalAvailabilityPingSearchQueryPlugin($container);
        $container = $this->addConditionalAvailabilityPingSearchQueryExpanderPlugins($container);
        $container = $this->addConditionalAvailabilityPingSearchQueryFormatterPlugins($container);

        return $container;
    }
1246859
public function setDependencies(Container $container)
    {
        parent::setDependencies($container);

        $this->basePath = $container['config']['base_path'];
        $this->publicPath = $container['config']['public_path'];

        $this->setElfinderConfig($container['elfinder/config']);
        $this->setPropertyFactory($container['property/factory']);
        $this->setCallableResolver($container['callableResolver']);

        /** @see \Charcoal\App\ServiceProvide\FilesystemServiceProvider */
        $this->filesystemConfig = $container['filesystem/config'];
        $this->filesystems = $container['filesystems'];
    }
514774
protected function setDependencies(ServiceContainer $container)
    {
        parent::setDependencies($container);

        if (isset($container['attachments/config'])) {
            $this->setConfig($container['attachments/config']);
        } elseif (isset($container['config']['attachments'])) {
            $this->setConfig($container['config']['attachments']);
        }
    }