public function addDependencies($id, $className, $constructor, array $dependencies)
    {
        $result = true;

        foreach ($dependencies as $dependency) {
            $result = $result && $this->addDependency($id, $className, $constructor, $dependency);

            if (false === $result) {
                throw new Doozr_Di_Exception(
                    sprintf(
                        'Dependencies could not be added! The dependency with target: "%s" produced an error. '.
                        'No Dependencies added.',
                        $dependency->getTarget()
                    )
                );
            }
        }

        return $result;
    }
public function addDependencies($id, $className, $constructor, array $dependencies)
    {
        $result = true;

        foreach ($dependencies as $dependency) {
            $result = $result && $this->addDependency($id, $className, $constructor, $dependency);

            if (false === $result) {
                throw new Doozr_Di_Exception(
                    sprintf(
                        'Dependencies could not be added! The dependency with target: "%s" produced an error. '.
                        'No Dependencies added.',
                        $dependency->getTarget()
                    )
                );
            }
        }

        return $result;
    }
public function addDependencies ( $ id , $ className , $ constructor , array $ dependencies ) { $ result = true ; foreach ( $ dependencies as $ dependency ) { $ result = $ result && $ this -> addDependency ( $ id , $ className , $ constructor , $ dependency ) ; if ( false === $ result ) { throw new Doozr_Di_Exception ( sprintf ( 'Dependencies could not be added! The dependency with target: "%s" produced an error. ' . 'No Dependencies added.' , $ dependency -> getTarget ( ) ) ) ; } } return $ result ; }
Adds a collection of dependencies to existing collection.

@param string                $id           Identifier to file the reference under
@param string                $className    Name of the class having the dependencies
@param string                $constructor  Constructor of the class having the dependencies
@param Doozr_Di_Dependency[] $dependencies Collection of dependency recipes

@author Benjamin Carl <opensource@clickalicious.de>

@return bool TRUE on success, otherwise FALSE

@throws Doozr_Di_Exception
Adds a collection of dependencies to existing collection .