public function addToBundle($name, $deps)
    {
        if ($name == '') {
            throw new exception\InvalidArgumentException('The require.js bundle name must not be empty');
        }

        if (!is_array($deps) && !($deps instanceof \Traversable)) {
            $deps = [ $deps ];
        }

        if (!isset($this->bundles[$name])) {
            $this->bundles[$name] = [];
        }

        foreach ($deps as $item) {
            $item = (string)$item;

            if ($item != '') {
                $this->bundles[$name][] = $item;
            }
        }

        return $this;
    }
public function addToBundle($name, $deps)
    {
        if ($name == '') {
            throw new exception\InvalidArgumentException('The require.js bundle name must not be empty');
        }

        if (!is_array($deps) && !($deps instanceof \Traversable)) {
            $deps = [ $deps ];
        }

        if (!isset($this->bundles[$name])) {
            $this->bundles[$name] = [];
        }

        foreach ($deps as $item) {
            $item = (string)$item;

            if ($item != '') {
                $this->bundles[$name][] = $item;
            }
        }

        return $this;
    }
public function addToBundle ( $ name , $ deps ) { if ( $ name == '' ) { throw new exception \ InvalidArgumentException ( 'The require.js bundle name must not be empty' ) ; } if ( ! is_array ( $ deps ) && ! ( $ deps instanceof \ Traversable ) ) { $ deps = [ $ deps ] ; } if ( ! isset ( $ this -> bundles [ $ name ] ) ) { $ this -> bundles [ $ name ] = [ ] ; } foreach ( $ deps as $ item ) { $ item = ( string ) $ item ; if ( $ item != '' ) { $ this -> bundles [ $ name ] [ ] = $ item ; } } return $ this ; }
Adde dependencies to an existing bundle

@see http://requirejs.org/docs/api.html#config-bundles
@param string $name
@param array|string $deps
@return self
Adde dependencies to an existing bundle