src/NestedContainer.php
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);
        }
    }
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);
        }
    }
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 ) ; } }
Adds container to the beginning of the collection
@param ContainerInterface $container
@param string $name
Adds container to the beginning of the collection