Carga cada una de las dependencias indicadas en su correspondiente propiedad del objeto
Esta funcion supone que las Clases de las dependencias ya se encuentran importadas.
@param type $object
@param array $dependencies
779123
public function injectDependencies($object, array $dependencies){
        $dependenciesDefinition= $this->dependencies;
        //Recorre las dependencias indicadas y las que existe las carga
        foreach ($dependencies as $property => $dependencyName) {
            if(isset($dependenciesDefinition[$dependencyName])){
                $dependency= $dependenciesDefinition[$dependencyName];
                $this->loadDependencyInObject($object, $property, $dependencyName, $dependency);
            }
        }
    }
364833
public function movePackage($package)
    {
        if (! empty($package->dependencies)) {
            foreach ($package->dependencies as $dependency) {
                $this->movePackage($dependency);
            }
        }

        $this->mover->movePackage($package);
    }
181903
public function addDependency($dep)
    {
        if (is_array($dep)) {
            $this->dependencies = array_merge($this->dependencies, $dep);
        } else {
            $this->dependencies[] = $dep;
        }
    }
968232
public function are_dependencies_satisfied($dependencies) {
        foreach ($dependencies as $component => $requiredversion) {
            $otherplugin = $this->get_plugin_info($component);
            if (is_null($otherplugin)) {
                return false;
            }

            if ($requiredversion != ANY_VERSION and $otherplugin->versiondisk < $requiredversion) {
                return false;
            }
        }

        return true;
    }
770516
private function installGlobal(array $dependencies)
    {
        $requirements = [];
        foreach ($dependencies as $package => $version) {
            $requirements[] = $version === '*' ? $package : $package . ':' . $version;
        }
        $this->runCommand(
            'composer global require '
            . '--no-progress --prefer-dist --optimize-autoloader --no-interaction '
            . implode(' ', array_map('escapeshellarg', $requirements))
        );
    }
374810
protected function applyDependencies($sources, \Traversable $dependencies, callable $insert)
    {
        foreach ($dependencies as $query => $subDependencies) {
            $joinedCode = '';
            foreach ($subDependencies as $file) {
                $joinedCode .= $insert($file);
            }
            $sources = str_replace($query, $joinedCode, $sources);
        }

        return $sources;
    }
856205
public function importMap (string $basePath, array $dependencyMap) : void
    {
        $basePath = rtrim($basePath, "/");

        foreach ($dependencyMap as $file => $dependencies)
        {
            foreach ($dependencies as $dependency)
            {
                if ("js" === pathinfo($dependency, PATHINFO_EXTENSION))
                {
                    $this->dependencyMap["{$basePath}/{$file}.js"][] = "{$basePath}/{$dependency}";
                }
            }
        }
    }
1205346
protected function validateDependencies($fixtureClass, $dependenciesClasses)
    {
        if (!is_array($dependenciesClasses) || empty($dependenciesClasses)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Method "%s" in class "%s" must return an array of classes which are'
                    . ' dependencies for the fixture, and it must be NOT empty.',
                    'getDependencies',
                    $fixtureClass
                )
            );
        }

        if (in_array($fixtureClass, $dependenciesClasses)) {
            throw new \InvalidArgumentException(
                sprintf('Class "%s" can\'t have itself as a dependency', $fixtureClass)
            );
        }

        $loadedFixtureClasses = array_keys($this->fixtures);
        foreach ($dependenciesClasses as $class) {
            if (!in_array($class, $loadedFixtureClasses)) {
                throw new \RuntimeException(
                    sprintf(
                        'Fixture "%s" was declared as a dependency, but it should be added in fixture loader first.',
                        $class
                    )
                );
            }
        }

        return true;
    }
20782
public function depend($entity, $type) {
		$depend = $type === 'count' ? 0 : [];

		foreach (static::_dependent() as $model) {
			$results = $model::find($type, [
				'conditions' => [
					'tags' => $entity->name
				]
			]);
			if (!$results) {
				continue;
			}
			if ($type === 'count') {
				$depend += $results;
			} else {
				foreach ($results as $result) {
					$depend[] = $result;
				}
			}
		}
		return $depend;
	}
112270
protected function init(){
        //Carga las dependencias en base a la lista de archivos definidos en configuracion global
        $this->dependencies= array();
        foreach ($this->context->getDependenciesFile() as $nameFile) {
            $this->dependencies= array_merge($this->dependencies, $this->context->readConfigurationFile($nameFile));
        }
        //Define las dependencias que se cargan segun Type
        $this->loadDependencies= array();
        foreach ($this->dependencies as $key => $value) {
            if(isset($value['load_in'])){
                $this->loadDependencies[$key]= $value;
            }
        }
    }
1160312
protected function register(
        string $type,
        $name,
        string $source,
        $dependencies,
        $attributes,
        $replaces
    ): void {
        $dependencies = (array) $dependencies;
        $attributes = (array) $attributes;
        $replaces = (array) $replaces;

        if (\is_array($name)) {
            $replaces = \array_merge($name, $replaces);
            $name = '*';
        }

        $this->assets[$type][$name] = [
            'source' => $source,
            'dependencies' => $dependencies,
            'attributes' => $attributes,
            'replaces' => $replaces,
        ];
    }
1326256
protected function createBundles(array $dependencies)
    {
        foreach ($dependencies as $bundleClass) {
            $name = substr($bundleClass, strrpos($bundleClass, '\\') + 1);

            if (false === isset($this->bundles[$name])) {
                $bundle = new $bundleClass();
                $this->bundles[$name] = $bundleClass;
                $this->instances[$name] = $bundle;

                if ($bundle instanceof BundleDependencyInterface) {
                    $this->createBundles($bundle->getBundleDependencies());
                }
            }
        }

        return count($this->instances) > 0;
    }
786777
protected function orderByDependencies(array $dependencies): array
    {
        $ordered = [];
        $available = array_keys($dependencies);

        while (0 !== \count($dependencies)) {
            $success = $this->doResolve($dependencies, $ordered, $available);

            if (false === $success) {
                throw new UnresolvableDependenciesException(
                    "The dependencies order could not be resolved.\n".print_r($dependencies, true)
                );
            }
        }

        return $ordered;
    }
788988
private function installGlobal(array $dependencies)
    {
        foreach ($dependencies as $package => $version) {
            if (!$this->isInstalledGlobally($package)) {
                $arg = $version === '*' ? $package : $package . '@' . $version;
                $this->runCommand('npm install --global ' . escapeshellarg($arg));
            }
        }
    }
844198
public function injectDependency($property, $object)
    {
        if (!property_exists($this, $property)) {
            $this->raiseError("Injecting unknown property.");
        }
        $this->$property = $object;
        return $this;
    }
469193
public function dispatchRequirements($dependencies, $parameters) {
		$dispatches = [];

		foreach ($dependencies as $dependency) {
			list($name, $instance) = $this->extractDependency($dependency, $parameters);

			$dispatches[$name] = $instance;
		}

		return $dispatches;
	}
929809
public static function setDependencies($dependencies) {
		self::$dependencies = [];
		foreach ($dependencies as $k => $v) {
			self::addDependency($k, $v);
		}
	}