public function extend($name, Closure $callback)
        {
            if (count($this->_items)) {
                $collection = array();

                foreach ($this->_items as $item) {
                    if ($item instanceof Container) {
                        $item->fn($name, $callback);
                    }

                    array_push($collection, $item);
                }

                return new self($collection);
            }
            return $this;
        }
public function extend($name, Closure $callback)
        {
            if (count($this->_items)) {
                $collection = array();

                foreach ($this->_items as $item) {
                    if ($item instanceof Container) {
                        $item->fn($name, $callback);
                    }

                    array_push($collection, $item);
                }

                return new self($collection);
            }
            return $this;
        }
public function extend ( $ name , Closure $ callback ) { if ( count ( $ this -> _items ) ) { $ collection = array ( ) ; foreach ( $ this -> _items as $ item ) { if ( $ item instanceof Container ) { $ item -> fn ( $ name , $ callback ) ; } array_push ( $ collection , $ item ) ; } return new self ( $ collection ) ; } return $ this ; }
extends each Container item of this collection with a Closure.

@param  string  $name
@param Closure $callback callback
@return Collection
extends each Container item of this collection with a Closure .