setContainer

@param   string    $profile
@param   Container $container

@return  void
348473
public static function setContainer($profile, Container $container)
    {
        $profile = $profile ?: self::$profile;

        $profile = strtolower(StringNormalise::toDashSeparated($profile));

        self::$instances[$profile] = $container;
    }
3699
public function setServiceLocator(ContainerInterface $container)
    {
        trigger_error(sprintf(
            'Usage of %s is deprecated since v3.0.0; please pass the container to the constructor instead',
            __METHOD__
        ), E_USER_DEPRECATED);
        $this->creationContext = $container;
    }
815438
public function save( Container $container ) {

		$this->internalCache->save(
			$container->getId(),
			$container->getData(),
			$container->getExpiry()
		);

		$this->cache->save(
			$container->getId(),
			serialize( $container->getData() ),
			$container->getExpiry()
		);

		unset( $container );
	}
308621
public function setInstance(Container $app)
    {
        $app->instance('app', $app);
        $app->instance(Container::class, $app);

        if ($this->framework === 'lumen') {
            $app->instance(LumenApplication::class, $app);
        }

        Container::setInstance($app);
        Context::setApp($app);
        Facade::clearResolvedInstances();
        Facade::setFacadeApplication($app);
    }
1269616
public function configureProfiler(ContainerBuilder $container, array $config)
    {
        // Setup the data collector service for Symfony profiler
        $dataCollectorDef = new Definition(PheanstalkDataCollector::class);
        $dataCollectorDef->setPublic(false);
        $dataCollectorDef->addTag('data_collector', ['id' => 'pheanstalk', 'template' => $config['profiler']['template']]);
        $dataCollectorDef->addArgument(new Reference('leezy.pheanstalk.pheanstalk_locator'));

        $container->setDefinition('leezy.pheanstalk.data_collector', $dataCollectorDef);
    }
519608
public function setProfile($profile)
	{
		$this->_profile = $profile;

		// Set the parser configs.
		$this->setConfig($this->getProfileConfig('parser'));
        $this->reset($this->_string, true);
        $this->defaults();

        return $this;
	}
630129
public function setContainer(Container $container)
    {
        $pipeline = $this->pipeline;

        $closure = function () use ($container) {
            $this->container = $container;
        };

        $resetPipeline = $closure->bindTo($pipeline, $pipeline);
        $resetPipeline();

        return $this;
    }
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'];
    }
1359988
protected function setDependencies(Container $container)
    {
        parent::setDependencies($container);

        $this->setDebug($container['debug']);
        $this->setTranslator($container['translator']);
        $this->setAppConfig($container['config']);
        $this->setBaseUrl($container['base-url']);

        $metatags = $this->appConfig('cms.metatags');
        if (is_array($metatags)) {
            $this->setSeoMetadata($metatags);
        }
    }
616838
public function leave(Profile $profile)
    {
        parent::leave($profile);

        $name = 'Twig Template: ' . substr($profile->getName(), strlen(ROOT) + 1);
        DebugTimer::stop($name);
    }
995733
protected function loadProfiles(array $profiles, ContainerBuilder $container)
    {
        foreach ($profiles as $profileName => $profile) {
            $definition = $container
                ->register(
                    'elcodi.sitemap_profile.' . $profileName,
                    'Elcodi\Component\Sitemap\Profile\SitemapProfile'
                )
                ->addArgument(new Reference($profile['languages']))
                ->setPublic(true);

            foreach ($profile['builders'] as $builderReference) {
                $definition->addMethodCall(
                    'addSitemapDumper',
                    [new Reference('elcodi.sitemap_dumper.' . $builderReference)]
                );
            }
        }

        return $this;
    }
895283
public function set(string $profile, $inheritContext = false)
    {
        return $this->has($profile) ? $this->get($profile) : $this->add($profile, $inheritContext);
    }
58009
protected function setDependencies(Container $container)
    {
        parent::setDependencies($container);

        $this->setLocales($container['locales/manager']->locales());
    }
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']);
    }
784486
public function configureCdnAdapter(ContainerBuilder $container, array $config): void
    {
        if ($container->hasDefinition('bkstg.core.cdn.private_do_spaces') && isset($config['cdn'])) {
            $container
                ->getDefinition('bkstg.core.cdn.private_do_spaces')
                ->replaceArgument(0, $config['cdn']['bucket'])
                ->replaceArgument(1, new Reference($config['cdn']['client']))
            ;
        } else {
            $container->removeDefinition('bkstg.core.cdn.private_do_spaces');
        }
    }
897054
public function setContainer(\Interne\SeanceBundle\Entity\Container $container = null)
    {
        $this->container = $container;

        return $this;
    }
1299151
public function setContainer($key, Placeholder\HtmlClassContainer $container)
    {
        $this->registry->setContainer($key, $container);

        return $this;
    }