@param ContainerInterface $container

@return void

@throws ContainerExceptionInterface
@throws InvalidArgumentException
@throws NotFoundExceptionInterface
@throws DBALException
970830
public function rollback(ContainerInterface $container): void
    {
        foreach ($this->getRollbacks($container) as $class) {
            assert(is_string($class));
            $this->getIO()->writeInfo("Starting rollback for `$class`..." . PHP_EOL, IoInterface::VERBOSITY_VERBOSE);
            if (($migration = $this->createMigration($class, $container)) !== null) {
                $migration->init($container)->rollback();
                $this->getIO()->writeInfo("Rollback finished for `$class`." . PHP_EOL, IoInterface::VERBOSITY_NORMAL);
            }
        }

        $manager = $this->getConnection($container)->getSchemaManager();
        if ($manager->tablesExist([static::MIGRATIONS_TABLE]) === true) {
            $manager->dropTable(static::MIGRATIONS_TABLE);
        }
        if ($manager->tablesExist([static::SEEDS_TABLE]) === true) {
            $manager->dropTable(static::SEEDS_TABLE);
        }
    }
605736
public function setupRequirements(ContainerInterface $container)
    {
        $this->setTranslator($container->get('MvcTranslator'));
        $this->setInputFilterManager($container->get(InputFilterPluginManager::class));
    }
732943
public function setContainer(ContainerInterface $container = null)
    {
        parent::setContainer($container);

        if (!$this->container->getParameter('fom_user.reset_password')) {
            throw new AccessDeniedHttpException();
        }
    }
643925
public function create($id, ContainerInterface $container)
    {
        if (isset($this->registeredList['services'][$id])) {
            $data = $this->createService($id, $container);
        } elseif (isset($this->registeredList['params'][$id])) {
            $data = $this->registeredList['params'][$id];
        } else {
            $data = null;
        }

        return $data;
    }
1286353
public function addPrepend(ContainerInterface $container, $name = null)
    {
        if ($name !== null) {
            unset($this->containers[$name]);
            $this->containers = array_merge([$name => $container], $this->containers);
        } else {
            array_unshift($this->containers, $container);
        }
    }
777066
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition($this->subjectService)) {
            return;
        }

        $subjects = $this->findTaggedServices($container, $this->subjectTag, SubjectInterface::class, 'support', false);

        $subjectDefinition = $container->getDefinition($this->subjectService);
        $subjectDefinition->replaceArgument(0, $subjects);
    }
743219
public function setContainer(ContainerInterface $container = null)
    {
        parent::setContainer($container);

        if ($this->getApplication()) {
            $mediaClasses = $this->getApplication()->getAutoloader()->glob('Media'.DIRECTORY_SEPARATOR.'*');
            foreach ($mediaClasses as $mediaClass) {
                class_exists($mediaClass);
            }
        }
    }
669578
public function addContainer(ContainerInterface $container)
    {
        $container->setDelegator($this);
        $this->containers[] = $container;
        return $this;
    }
691400
protected function executeCache(ContainerInterface $container, IoInterface $inOut): void
    {
        assert($inOut);

        $appConfig     = $this->getApplicationConfiguration($container);
        $cacheDir      = $appConfig[ApplicationConfigurationInterface::KEY_CACHE_FOLDER];
        $cacheCallable = $appConfig[ApplicationConfigurationInterface::KEY_CACHE_CALLABLE];
        list ($namespace, $class, $method) = $this->parseCacheCallable($cacheCallable);
        if ($class === null || $namespace === null || $method === null) {
            // parsing of cache callable failed (most likely error in settings)
            throw new ConfigurationException();
        }

        /** @var CacheSettingsProviderInterface $settingsProvider */
        $settingsProvider = $container->get(CacheSettingsProviderInterface::class);
        $settingsData     = $settingsProvider->serialize();
        $content          = $this->composeContent($settingsData, $namespace, $class, $method);

        $path = $cacheDir . DIRECTORY_SEPARATOR . $class . '.php';
        $this->getFileSystem($container)->write($path, $content);

        $inOut->writeInfo('Cache created.' . PHP_EOL);
        $inOut->writeInfo("Cache written to `$path`." . PHP_EOL, IoInterface::VERBOSITY_VERBOSE);
    }
559533
protected function executeSeedInit(ContainerInterface $container, string $seedClass): void
    {
        if ($this->seedInit !== null) {
            call_user_func($this->seedInit, $container, $seedClass);
        }
    }
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;
            };
        }
    }
964313
public function process(ContainerBuilder $container)
    {
        $compiler = $container->getCompiler();
        $formatter = $compiler->getLoggingFormatter();

        foreach ($container->getDefinitions() as $id => $definition) {
            if ($definition->isAbstract()) {
                $container->removeDefinition($id);
                $compiler->addLogMessage($formatter->formatRemoveService($this, $id, 'abstract'));
            }
        }
    }
1271601
public function process(ContainerBuilder $container)
    {
        $this->processDriverPass($container);
        $this->processDriverElementPass($container);
        $this->processEventSubscriberPass($container);
        $this->processClassGenerator($container);

        $this->setPageObjectNamespaces($container);
        $this->injectSiteUrlIntoPageObjects($container);
    }
1310312
protected function finish(ContainerInterface $container)
	{
		foreach ($this->getPackages() as $package) {
			$package->finish($container);
		}
	}
1267863
public function setContainer(ContainerInterface $container = null)
    {
        $this->container = $container;
        $this->application = null !== $container ? $this->container->get('bbapp') : null;
    }
805925
public function process(ContainerBuilder $container)
    {
        $this->bag = $container->getParameterBag();

        try {
            parent::process($container);

            $aliases = array();
            foreach ($container->getAliases() as $name => $target) {
                $this->currentId = $name;
                $aliases[$this->bag->resolveValue($name)] = $target;
            }
            $container->setAliases($aliases);
        } catch (ParameterNotFoundException $e) {
            $e->setSourceId($this->currentId);

            throw $e;
        }

        $this->bag->resolve();
        $this->bag = null;
    }
406941
public function delete(Model\ContainerInterface $container)
    {
        // Ensure not named / alone
        if ($container->isAlone() || $container->isNamed() || $container->isTitled()) {
            throw new InvalidOperationException(
                "The container can't be removed because it is named or the parent content does not have enough children."
            );
        }

        // Check if the container is not the only content container (a content must have at least one container).
        if (null === $content = $container->getContent()) {
            throw new InvalidOperationException(
                "The container does not belong to a content and therefore can't be removed."
            );
        }

        // Plugin remove
        $this->editor
            ->getContainerPlugin($container->getType())
            ->remove($container);

        $content->removeContainer($container);

        $this->editor
            ->getContentManager()
            ->fixContainersPositions($content);

        return $container;
    }