src/Container.php
public function register($container): void
    {
        static $id = 0;

        $this->containers[++$id] = $container;

        $priority = 0;
        if ($container instanceof HasPriorityInterface) {
            $priority = $container->priority();
        }
        $this->priorities[$id] = $priority;

        if ($container instanceof IterableContainerInterface) {
            $servicesList = $container->list();
        } else {
            try {
                $servicesList = $this->servicesExtractor->extractServicesId($container);
            } catch (\ReflectionException $e) {
                $servicesList = [];
            }
        }
        $this->loadServices($id, $servicesList);
        if ($container instanceof HasContainerLinkInterface) {
            $container->setContainer($this);
        }
    }
public function register($container): void
    {
        static $id = 0;

        $this->containers[++$id] = $container;

        $priority = 0;
        if ($container instanceof HasPriorityInterface) {
            $priority = $container->priority();
        }
        $this->priorities[$id] = $priority;

        if ($container instanceof IterableContainerInterface) {
            $servicesList = $container->list();
        } else {
            try {
                $servicesList = $this->servicesExtractor->extractServicesId($container);
            } catch (\ReflectionException $e) {
                $servicesList = [];
            }
        }
        $this->loadServices($id, $servicesList);
        if ($container instanceof HasContainerLinkInterface) {
            $container->setContainer($this);
        }
    }
Регистрирует новый контейнер.

@param IterableContainerInterface|HasContainerLinkInterface|object $container

@return void