Register mappings with the metadata drivers.

@param ContainerBuilder $container
165706
public function process(ContainerBuilder $container)
    {
        if (!$container->hasParameter($this->enabledParameter)) {
            return;
        }

        $chainDriverDefService = $this->getChainDriverServiceName($container);
        $chainDriverDef = $container->getDefinition($chainDriverDefService);

        foreach ($this->namespaces as $namespace) {
            $chainDriverDef->addMethodCall('addDriver', [$this->driver, $namespace]);
        }
    }
930392
public function build(ContainerBuilder $container)
    {
        parent::build($container);
        $container->addCompilerPass(new ApplicationConfigProviderPass());
        $container->addCompilerPass(new TranslationDomainsExtensionsPass());
        $container->addCompilerPass(new ValueObjectVisitorPass());
    }
787499
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition('profiler') || !$container->hasDefinition('twig')) {
            return;
        }

        $container->register('contentful.delivery.profiler_controller', ProfilerController::class)
            ->setArguments([
                new Reference('profiler'),
                new Reference('twig'),
            ])
            ->setPublic(\true)
            ->addTag('controller.service_arguments')
        ;
    }
302961
public function process(ContainerBuilder $container)
    {
        if (!$container->has('ezpublish.view_builder.registry')) {
            return;
        }

        $viewBuilderRegistry = $container->findDefinition('ezpublish.view_builder.registry');
        $viewBuilders = [
            $container->findDefinition('support_tools.view.system_info_view_builder'),
        ];

        $viewBuilderRegistry->addMethodCall('addToRegistry', [$viewBuilders]);
    }
1308582
public function build(ContainerBuilder $container)
    {
        $container->addCompilerPass(
            new GenericCompilerPass(
                FilterTypeRegistry::class,
                'sidus.filter_type',
                'addFilterType'
            )
        );
        $container->addCompilerPass(
            new GenericCompilerPass(
                QueryHandlerRegistry::class,
                'sidus.query_handler_factory',
                'addQueryHandlerFactory'
            )
        );
    }
925204
public function register(Container $container)
    {
        $router = new RouteCollection(config()->get('namespace', '\\Controller\\'));
        $dispatcher = new RouteDispatcher($router, $container['config']->get('middleware', []));

        $container->add('router', $router);
        $container->add('dispatcher', $dispatcher);

        include app()->getPath().'/config/routes.php';
    }
140012
public function register(Container $container)
    {
        $container->prepareSharedObject(RendererManager::class, [$this, 'manager']);
        $container->prepareSharedObject(PackageFinder::class);
        $container->share(WidgetManager::class, [$this, 'widget']);
    }
471272
private function addRegisterMappingsPass(ContainerBuilder $container)
    {
        $mappings = array(
            realpath(__DIR__ . '/Resources/config/doctrine/model') => 'Silvestra\Component\Media\Model',
        );

        $ormCompilerClass = 'Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass';
        if (class_exists($ormCompilerClass)) {
            $container->addCompilerPass(DoctrineOrmMappingsPass::createXmlMappingDriver($mappings));
        }
    }
539426
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new ConfigurationCompilerPass());
        $container->addCompilerPass(new VendorCompilerPass());
    }
761843
public function register(Container $container)
    {
        $container->share(MatcherInterface::class, [$this, 'matcher']);

        $container->prepareSharedObject(RouteCreator::class);
        $container->prepareSharedObject(MainRouter::class);
    }
397733
public function register(Container $container)
    {
        if (!isset($container->get('settings')['view'])) {
            throw new InvalidArgumentException('Template configuration not found');
        }

        $engine = new Plates(
            $container->get('settings')['view'],
            $container->get('response')
        );

        $engine->loadExtension(
            new PlatesExtension(
                $container->get('router'),
                $container->get('request')->getUri()
            )
        );

        $container['view'] = $engine;
    }
511257
public function process(ContainerBuilder $container): void
    {
        if (true === self::enabled($container))
        {
            $excludedFiles = canonicalizeFilesPath(self::getExcludedFiles($container));

            $files = searchFiles(self::getDirectories($container), '/\.php/i');

            $this->registerClasses($container, $files, $excludedFiles);
        }
    }
26343
public function build(ContainerBuilder $container)
    {
        $container->addCompilerPass(new CommandProcessorPass(), PassConfig::TYPE_BEFORE_REMOVING);
        $container->addCompilerPass(new PoolsPass());
        $container->addCompilerPass(new RegisterSerializerDriversPass());
        $container->addCompilerPass(new WorkerRunnersPass());
    }
1315225
private function registerLocator(
        ContainerBuilder $container,
        EntityMapping $entityMapping
    ) {
        /**
         * Locator.
         */
        $locatorId = 'simple_doctrine_mapping.locator.' . $entityMapping->getUniqueIdentifier();
        $locator = new Definition('Mmoreram\SimpleDoctrineMapping\Locator\SimpleDoctrineMappingLocator');
        $locator->setPublic(false);
        $locator->setArguments([
            $entityMapping->getEntityNamespace(),
            [$entityMapping->getEntityMappingFilePath()],
        ]);
        $locator->setConfigurator([
            new Reference('simple_doctrine_mapping.locator_configurator'),
            'configure',
        ]);
        $container->setDefinition($locatorId, $locator);
    }
690980
public function register(Container $container)
    {
        $this->registerViewConfig($container);
        $this->registerLoaderServices($container);
        $this->registerEngineServices($container);
        $this->registerMustacheTemplatingServices($container);
        $this->registerTwigTemplatingServices($container);
        $this->registerViewServices($container);
    }
183960
public function process(ContainerBuilder $container)
    {
        if ($container->hasAlias('api_platform.name_converter') || !$container->hasDefinition('serializer.name_converter.metadata_aware')) {
            return;
        }

        $definition = $container->getDefinition('serializer.name_converter.metadata_aware');

        if (1 >= \count($definition->getArguments()) || null === $definition->getArgument(1)) {
            return;
        }

        $container->setAlias('api_platform.name_converter', 'serializer.name_converter.metadata_aware');
    }
596920
public function process(ContainerBuilder $container)
    {
        foreach ($container->findTaggedServiceIds($this->baseTag) as $id => $services) {
            foreach ((array) $services as $service) {
                $this->findAndReplaceTaggedServices($id, $service, $container);
            }
        }
    }