public static function buildContainer(array $definitions)
    {
        /** @var ContainerBuilder $builder */
        $builder = new static();
        $container = Container::getContainer();
        $manager = $builder->_createManager($definitions);
        if (!$container) {
            $container = new Container($manager);
        } else {
            $builder->_merge($container->getDefinitionManager(), $manager);
        }
        return $container;
    }