@param $dependency

@return array
424044
public function getReflectionParam($dependency)
    {
        $resolveClass = null;
        //Get constructor class name
        $resolveClass = $dependency->getClass()->name;

        return [$resolveClass, new \ReflectionClass($resolveClass)];
    }
810697
function getDependency(dependency) {
            if (dependency) {
                return angular.isString(dependency) ? $injector.get(dependency) : dependency;
            }

            return undefined;
        }
784276
public function add(Dependency $dependency) : DependencySet
    {
        $clone = clone $this;
        if ($this->contains($dependency)
            || $dependency->count() === 0) {
            return $clone;
        }

        $clone->collection[] = $dependency;
        return $clone;
    }
1301346
public function getDependencies(array $parameters)
    {
    	$dependencies = array();

        foreach ($parameters as $parameter) {

            try {

                $dependency = $parameter->getClass();

            } catch (ReflectionException $e) {

                throw new ResolveException('Target <' . $parameter . '> could not be found.', $e->getCode(), $e);

            }

            if (is_null($dependency)) {
                // It 's a string or the like
                $dependencies[] = $this->resolveArgument($parameter);

            } else {

                $dependencies[] = $this->resolveClass($parameter);

            }
        }

        return (array) $dependencies;
    }
469193
public function dispatchRequirements($dependencies, $parameters) {
		$dispatches = [];

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

			$dispatches[$name] = $instance;
		}

		return $dispatches;
	}
1028139
public function getImportsWithDependencies (array $imports)
    {
        $toLoad = [];

        foreach ($imports as $import)
        {
            $dependencies = $this->map[$import] ?? null;

            if (null !== $dependencies)
            {
                foreach ($dependencies as $dependency)
                {
                    $toLoad[$dependency] = true;
                }
            }
            else
            {
                $toLoad[$import] = true;
            }
        }

        return \array_keys($toLoad);
    }
1131863
public function getFlattenedRequiredPackages()
    {
        $result = [];
        foreach ($this->getRequiredPackages() as $dependency) {
            $name          = $dependency->getPackage()->getName();
            $result[$name] = $dependency;
            $result        = array_merge($result, $dependency->getFlattenedRequiredPackages());
        }
        return $result;
    }
507417
private function resolverClass($dependency, $arguments)
    {
        list($resolveClass, $reflectionParam) = $this->injector->getReflectionParam($dependency);

        // Application and Container cannot be injected into controller currently
        // since Application constructor is protected
        if ($reflectionParam->IsInstantiable()) {
            return $this->makeInstance($resolveClass, $arguments);
        }

        return $this->injector->interfaceInjection($reflectionParam);
    }
346514
private function InstallDependency(BundleDependency $dependency)
    {
        $bundle = $dependency->BundleName();
        if (array_key_exists($bundle, $this->failedBundles))
        {
            return false;
        }
        $installedVersion = $this->InstalledVersion($bundle);
        $manifest = ClassFinder::Manifest($bundle);
        if (!$installedVersion || version_compare($installedVersion, $manifest->Version()) < 0)
        {
            if (!$this->InstallBundle($bundle))
            {
                return false;
            }
        }
        return true;
    }
762990
public function getIdsDependingOn($id)
    {
        $resolved = [];
        $unresolved = [];
        $this->dependencyResolve($id, $resolved, $unresolved);

        return array_keys($resolved);
    }
855503
public function getDependencyConfig(): array
    {
        return [
            'aliases' => [
                'TableManager' => Db\TableManager::class
            ],
            'factories' => [
                GulpRev::class                => Factory\GulpRevFactory::class,
                TransportInterface::class     => Mail\Transport\TransportServiceFactory::class,
                Db\TableManager::class        => Db\TableManagerFactory::class,
                \Rollbar\RollbarLogger::class => Rollbar\LoggerFactory::class,
            ]
        ];
    }
490799
private function checkDependency($operation, $dependency)
    {
        //['target' => $addedModelName, 'type' => true, 'action' => false]
        $target = ArrayHelper::getValue($dependency, 'target');
        $type = ArrayHelper::getValue($dependency, 'type');
        $action = ArrayHelper::getValue($dependency, 'action');
        $model = ArrayHelper::getValue($dependency, 'model', null);

        if (self::TYPE_MODEL === $type && self::ACTION_CREATED === $action) {
            // add model
            return
                $operation instanceof CreateModel &&
                strtolower($operation->name) === strtolower($target);
        } elseif (self::TYPE_FIELD === $type && self::ACTION_CREATED === $action) {
            // add field
            return

                $operation instanceof AddField &&
                strtolower($operation->name) === strtolower($target) &&
                strtolower($operation->modelName) === strtolower($model);
        //            ||(
            //                $operation instanceof CreateModel) &&
            //            strtolower($operation->name) === strtolower($target) &&
            //        any(dependency[2] == x for x, y in operation.fields)
            //                )
            //            )
        } elseif (self::TYPE_FIELD === $type && self::ACTION_DROPPED === $action) {
            // remove field
            return
                $operation instanceof RemoveField &&
                strtolower($operation->modelName) === strtolower($model) &&
                strtolower($operation->name) === strtolower($target);
        } elseif (self::TYPE_MODEL === $type && self::ACTION_DROPPED === $action) {
            //dropped model
            return
                $operation instanceof DeleteModel &&
                strtolower($operation->name) === strtolower($target);
        } elseif (self::TYPE_FIELD === $type && self::ACTION_ALTER === $action) {
            // altered field
            return
                $operation instanceof AlterField &&
                strtolower($operation->modelName) === strtolower($model) &&
                strtolower($operation->name) === strtolower($target);
        // Unknown dependency. Raise an error.
        } else {
            throw new ValueError(
                sprintf(
                    "Can't handle dependency %s %s '%s' ",
                    $action,
                    $target,
                    $type
                )
            );
        }
    }
1370658
public function getDependencies($id)
    {
        return (isset($this->dependenciesById[$id])) ?
            $this->dependenciesById[$id] :
            null;
    }
909337
private function getDependencies()
    {
        $dependencies = [];

        foreach ($this->resolver->names() as $name) {
            $dependencies[$name] = $this->getDependenciesRecursive($name);
        }

        return $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);
            }
        }
    }
1036036
protected function getDependencies()
    {
        return [
            'factories' => [
                PermissionMiddleware::class => PermissionMiddlewareFactory::class,
                ExpressiveRouteName::class => InvokableFactory::class,
                PermissionMiddleware::class => PermissionMiddlewareFactory::class,
                ResourceResolver::class => ResourceResolverAbstractFactory::class,
                RoleResolver::class => RoleResolverFactory::class,
                AclMiddleware::class => AclMiddlewareFactory::class,
                Acl::class => AclFromDataStoreFactory::class,
                UserRepository::class => UserRepositoryFactory::class,
                GuestAuthentication::class => GuestAuthenticationFactory::class,
                RedirectMiddleware::class => RedirectMiddlewareFactory::class,
                GoogleClient::class => GoogleClientFactory::class,
            ],
            'aliases' => [
                ConfigProvider::AUTHENTICATION_MIDDLEWARE_SERVICE => AuthenticationMiddleware::class,
                AuthenticationInterface::class => 'authenticationServiceChain',
                UserRepositoryInterface::class => UserRepository::class,

                self::RULE_DATASTORE_SERVICE => AclRulesTable::class,
                self::ROLE_DATASTORE_SERVICE => AclRolesTable::class,
                self::RESOURCE_DATASTORE_SERVICE => AclResourceTable::class,
                self::PRIVILEGE_DATASTORE_SERVICE => AclPrivilegeTable::class,
                self::USER_DATASTORE_SERVICE => AclUsersTable::class,
                self::USER_ROLE_DATASTORE_SERVICE => AclUserRolesTable::class,
            ],
            'abstract_factories' => [
                ResourceResolverAbstractFactory::class,
                RouteAttributeAbstractFactory::class,
                RouteNameAbstractFactory::class,
                MiddlewarePipeAbstractFactory::class,
                AuthenticationChainAbstractFactory::class,
                BasicAccessAbstractFactory::class,
                PhpSessionAbstractFactory::class,
                CredentialMiddlewareAbstractFactory::class,
            ],
            'invokables' => [
                PrivilegeResolver::class => PrivilegeResolver::class,
                AccessForbiddenHandler::class => AccessForbiddenHandler::class,
                ExpressiveRouteName::class => ExpressiveRouteName::class,
            ],
        ];
    }
1303651
public function getDependencies()
    {
        // Simple cache.
        if (is_array($this->dependencies)) {
            return $this->dependencies;
        }
        $this->dependencies = [];

        $filter = new StatementFilter();
        $parser = new CodeParser();

        $statements = $parser->parseFile($this->directory.'/version.php');

        try {
            $assign = $filter->findFirstPropertyFetchAssignment($statements, 'plugin', 'dependencies');
        } catch (\Exception $e) {
            try {
                $assign = $filter->findFirstPropertyFetchAssignment($statements, 'module', 'dependencies');
            } catch (\Exception $e) {
                return $this->dependencies;
            }
        }

        if (!$assign->expr instanceof Array_) {
            throw new \RuntimeException('The $plugin->dependencies must be assigned to an array in the version.php file.');
        }
        $this->dependencies = $filter->arrayStringKeys($assign->expr);

        return $this->dependencies;
    }