@override

Nest A Copy Of Container Within This Container

@param Container   $container
@param string|null $namespace Container Namespace

@return $this
182542
function nest(Container $container, $namespace = null)
    {
        if (!$container instanceof $this)
            throw new \InvalidArgumentException(sprintf(
                'Only can nest with same type pluginManager object, given "%s".'
                , get_class($container)
            ));

        parent::nest($container, $namespace);
        return $this;
    }
92499
protected function addCompanyFacade(Container $container): Container
    {
        $container[static::FACADE_COMPANY] = function (Container $container) {
            return new CompaniesRestApiToCompanyFacadeBridge(
                $container->getLocator()->company()->facade()
            );
        };

        return $container;
    }
563114
protected function setupContainer(Container $container=null)
    {
        $this->container = $container ?? $this->container ?? new Container;

        $prefix= $this->getAbstractPrefix();

        if (! $this->container->bound( $prefix.'config')) {
            $this->container->instance( $prefix .'config', new Repository);
        }

        $this->config=$this->container->make( $prefix . 'config');
    }
663711
public static function create($name = null)
    {
        $name = $name ? $name : self::generateName();
        $container = new Container($name);
        $container->register('Container', $container);
        self::$containers[$name] = $container;
        return $container;
    }
612976
public static function set(string $namespace, string $name = null, $object = null)
    {
        $name = $name ?: 'default';

        self::$container[$namespace][$name] = $object;

        return $object;
    }
1136405
public function resolveAndCreate($namespace, ContainerInterface $container)
    {
        $class = new \ReflectionClass($namespace);
        $arguments = $this->resolveReflectionArguments($class, $container);

        return $class->newInstanceArgs($arguments);
    }
286914
public function makeInstance(string $namespace, $arguments = [])
    {
        if (!class_exists($namespace)) {
            throw new ContainerException(sprintf('Class "%s" not exists.', $namespace));
        }
        $class = $this->getClassNameFromNamespace($namespace);

        if ($this->has($class)) {
            return $this->get($class);
        }

        return $this[$class] = new $namespace($arguments);
    }
624499
public function setRightMenu($container)
    {
        if (null === $container) {
            throw Exception\InvalidArgumentException(
                'Container must be a string alias or an instance of '
                . 'Zend\Navigation\AbstractContainer'
            );
        }
        $this->parseContainer($container);
        $this->rightMenu = $container;
        return $this;
    }
797197
public function setContainer(ContainerInterface $container)
    {
        $application = $this;
        $container->share(ApplicationInterface::class, $application);
        $container->share(\Interop\Container\ContainerInterface::class, $container);

        $this->container = $container;

        return $this;
    }
897054
public function setContainer(\Interne\SeanceBundle\Entity\Container $container = null)
    {
        $this->container = $container;

        return $this;
    }
765868
public function setContainer(Container $container = null)
    {
        $this->container = $container;
        $this->parameters = array();

        return $this;
    }
658205
public function setAsChildContainerOf(DelegateInterface $parentContainer) : DelegateInterface
    {
        $this->setParentContainer($parentContainer);
        $parentContainer->addChildContainer($this);
        return $this;
    }
39003
public function provideBusinessLayerDependencies(Container $container): Container
    {
        $container = parent::provideBusinessLayerDependencies($container);

        $container[static::SERVICE_COMPUTOP_API] = function () use ($container) {
            return $container->getLocator()->computopApi()->service();
        };

        $container[static::FACADE_STORE] = function () use ($container) {
            return new ComputopApiToStoreFacadeBridge($container->getLocator()->store()->facade());
        };

        return $container;
    }
1043797
public function setContainer(ContainerInterface $container = null)
    {
        $this->container = $container;
        if ($container) {
            // Specifically inject translator for tryTranslate method
            $this->translator = $container->get('translator');
        }
    }
102783
public function createService(ServiceLocatorInterface $container)
    {
        // Retrieve the parent container when under zend-servicemanager v2
        if (method_exists($container, 'getServiceLocator')) {
            $container = $container->getServiceLocator() ?: $container;
        }

        return $this($container, DoctrineWriter::class);
    }
159630
final public function load(string $namespace, string $resource): PrototypeConfigurator
    {
        $this->__destruct();

        return $this->parent->load($namespace, $resource);
    }
689863
public function setContainer(ContainerInterface $container)
    {
        $this->container = $container;
        $this->container->delegate(
            new ReflectionContainer()
        );
        $this->container->add(self::class, $this);
        self::setInstance($this);
    }