Processes all class generators.

@param ContainerBuilder $container
513912
private function processClassGenerators(ContainerBuilder $container)
    {
        $references = $this->processor->findAndSortTaggedServices($container, self::CLASS_GENERATOR_TAG);
        $definition = $container->getDefinition(self::getSuiteSetupId());

        foreach ($references as $reference) {
            $definition->addMethodCall('registerClassGenerator', array($reference));
        }
    }
539192
public function process(ContainerBuilder $container)
    {
        if(class_exists(\FOS\RestBundle\Routing\Loader\Reader\RestControllerReader::class)) {

            $definition = null;
            if($container->hasDefinition(\FOS\RestBundle\Routing\Loader\Reader\RestControllerReader::class)) {
                $definition = $container->getDefinition(\FOS\RestBundle\Routing\Loader\Reader\RestControllerReader::class);
            } elseif($container->hasDefinition('fos_rest.routing.loader.reader.controller')) {
                $definition = $container->getDefinition('fos_rest.routing.loader.reader.controller');
            }
            if(!is_null($definition)) {
                $definition->setClass(RestControllerReader::class);
            }
        }
    }
779429
public function process(ContainerBuilder $container)
    {
        if (!$container->has(VoteService::class)) {
            return;
        }
        $definition = $container->getDefinition(VoteService::class);

        $voteFactorieReferences = [];
        $voteFactories = $container->findTaggedServiceIds('expansion.vote_manager.vote');
        foreach ($voteFactories as $voteFactoryId => $data) {
            $voteFactorieReferences[] = new Reference($voteFactoryId);
        }

        $definition->replaceArgument('$voteFactories', $voteFactorieReferences);
    }
103283
public function process(ContainerBuilder $container)
    {
        $this->container = $container;
        $this->buildReader();
        $this->buildUseCaseProxies();
    }
134560
public function process(ContainerBuilder $container)
    {
        $overrideTemplates = $container->getParameter(
            EzPlatformStandardDesignExtension::OVERRIDE_KERNEL_TEMPLATES_PARAM_NAME
        );
        if ($overrideTemplates) {
            $loader = new YamlFileLoader(
                $container,
                new FileLocator(__DIR__ . '/../../Resources/config')
            );
            $loader->load('override/ezpublish.yaml');
        }

        $this->setStandardThemeDirectories($container);
    }
63734
public function process(ContainerBuilder $container)
    {
        $manager = $container->findDefinition(self::MANAGER_ID);

        $serviceIds = $container->findTaggedServiceIds(self::WORKER_RUNNER_TAG);
        foreach ($serviceIds as $serviceId => $tags) {
            $this->addManagerCalls($container, $manager, $serviceId, $tags);
        }
    }
94488
public function process(ContainerBuilder $container)
    {
        $this->compiler = $container->getCompiler();
        $this->formatter = $this->compiler->getLoggingFormatter();

        $container->setDefinitions($this->resolveArguments($container, $container->getDefinitions(), true));
    }
233386
public function process(ContainerBuilder $container)
    {
        $this->container = $container;

        foreach ($container->getDefinitions() as $id => $definition) {
            if ($definition->isSynthetic() || $definition->isAbstract()) {
                continue;
            }

            $this->currentId = $id;

            $this->validateReferences($definition->getArguments());
            $this->validateReferences($definition->getMethodCalls());
            $this->validateReferences($definition->getProperties());
        }
    }
245639
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition(static::REGISTRY_NAME) || !$container->hasDefinition(static::EVENT_DISPATCHER_NAME)) {
            return;
        }

        $registry = $container->getDefinition(static::REGISTRY_NAME);
        $dispatcherReference = new Reference(static::EVENT_DISPATCHER_NAME);
        $parameterBag = $container->getParameterBag();

        foreach ($container->findTaggedServiceIds(static::TAG_NAME) as $id => $tags) {
            $registry->addMethodCall("addDriver", [new Reference($id)]);

            // Inject the dispatcher in the driver
            $driver = $container->getDefinition($id);
            $driver->addMethodCall("setDispatcher", [$dispatcherReference]);

            foreach ($tags as $tag) {
                if (isset($tag[static::LISTENER_TAG_PARAMETER])) {
                    $listenerCode = $parameterBag->resolveValue($tag[static::LISTENER_TAG_PARAMETER]);

                    if (!$container->hasDefinition($listenerCode)) {
                        throw new ServiceNotFoundException(sprintf("The service '%s' doesn't exist", $listenerCode));
                    }

                    $listener = $container->getDefinition($listenerCode);
                    $listenerClass = $parameterBag->resolveValue($listener->getClass());

                    $reflection = new \ReflectionClass($listenerClass);

                    if (false === $reflection->implementsInterface(static::DRIVER_LISTENER_INTERFACE)) {
                        throw new InvalidArgumentException(sprintf(
                            "The service '%s' must implement interface '%s' but doesn't",
                            $listenerCode,
                            static::DRIVER_LISTENER_INTERFACE
                        ));
                    }

                    $listener->addMethodCall("setDriver", [new Reference($id)]);
                }
            }
        }
    }
116532
public function process(ContainerBuilder $container)
    {
        $taggedServices = $container->findTaggedServiceIds('ongr_cookie.cookie');
        $injectorDefinition = $container->getDefinition('ongr_cookie.injector');

        foreach ($taggedServices as $id => $tagAttributes) {
            $injectorDefinition->addMethodCall('addCookieModel', [new Reference($id)]);
        }
    }
431093
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition(static::TASK_REGISTRY)) {
            return;
        }

        $registry = $container->getDefinition(static::TASK_REGISTRY);

        foreach ($container->findTaggedServiceIds(static::TASK_TAG) as $id => $tag) {
            $registry->addMethodCall("addTask", [new Reference($id)]);
        }
    }
494622
public function process(ContainerBuilder $container)
    {
        if (! $container->hasDefinition('alchemy_rest.transformer_registry')) {
            return;
        }

        $transformerRegistry = $container->findDefinition('alchemy_rest.transformer_registry');
        $transformerTags = $container->findTaggedServiceIds('alchemy_rest.transformer');

        foreach ($transformerTags as $id => $tags) {
            foreach ($tags as $tag) {
                $transformerRegistry->addMethodCall('setTransformer', array($tag['alias'], new Reference($id)));
            }
        }
    }
345437
public function process(ContainerBuilder $container)
    {
        $this->container = $container;

        foreach ($container->getDefinitions() as $definition) {
            if ($definition->isSynthetic() || $definition->isAbstract()) {
                continue;
            }

            $definition->setArguments($this->processArguments($definition->getArguments()));
            $definition->setMethodCalls($this->processArguments($definition->getMethodCalls()));
            $definition->setProperties($this->processArguments($definition->getProperties()));
            $definition->setFactory($this->processFactory($definition->getFactory()));
        }

        foreach ($container->getAliases() as $id => $alias) {
            $aliasId = (string) $alias;
            if ($aliasId !== $defId = $this->getDefinitionId($aliasId)) {
                $container->setAlias($id, new Alias($defId, $alias->isPublic()));
            }
        }
    }
246536
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(
            new DependencyInjection\Compiler\EventPropagationPass(),
            PassConfig::TYPE_BEFORE_OPTIMIZATION
        );
    }
283090
public function process(ContainerBuilder $container): void
    {
        if ($container->has('ezpublish.image_alias.imagine.cache_resolver')) {
            $container
                ->findDefinition('ezpublish.image_alias.imagine.cache_resolver')
                ->setClass(IORepositoryResolver::class);
        }
    }
388225
public function process(ContainerBuilder $container)
    {
        $this->loader = $container->get('sulu.content.path_cleaner.replacer_loader');

        $service = $container->getDefinition('sulu.content.path_cleaner');
        $replacers = $this->loader->load($this->filename);
        $service->addArgument($replacers);
    }
965485
public function process(ContainerBuilder $container)
    {
        /** @var Glob $glob */
        $glob = $container->get(Glob::class);

        $locales = $glob->execGlob(ROOT . 'lang/*.po');
        $locales = array_map(function ($file) {
            return basename($file, '.po');
        }, $locales);

        $container->setParameter('locales', $locales);
    }