src/NestedContainer.php
public function add(ContainerInterface $container, $name = null)
    {
        if ($name !== null) {
            $this->containers[$name] = $container;
        } else {
            array_push($this->containers, $container);
        }
    }
public function add(ContainerInterface $container, $name = null)
    {
        if ($name !== null) {
            $this->containers[$name] = $container;
        } else {
            array_push($this->containers, $container);
        }
    }
public function add ( ContainerInterface $ container , $ name = null ) { if ( $ name !== null ) { $ this -> containers [ $ name ] = $ container ; } else { array_push ( $ this -> containers , $ container ) ; } }
Adds container to the collection
@param ContainerInterface $container
@param string $name
Adds container to the collection