yii\di\Container::resolveDependencies PHP Метод

resolveDependencies() защищенный Метод

Resolves dependencies by replacing them with the actual object instances.
protected resolveDependencies ( array $dependencies, ReflectionClass $reflection = null ) : array
$dependencies array the dependencies
$reflection ReflectionClass the class reflection associated with the dependencies
Результат array the resolved dependencies
    protected function resolveDependencies($dependencies, $reflection = null)
    {
        foreach ($dependencies as $index => $dependency) {
            if ($dependency instanceof Instance) {
                if ($dependency->id !== null) {
                    $dependencies[$index] = $this->get($dependency->id);
                } elseif ($reflection !== null) {
                    $name = $reflection->getConstructor()->getParameters()[$index]->getName();
                    $class = $reflection->getName();
                    throw new InvalidConfigException("Missing required parameter \"{$name}\" when instantiating \"{$class}\".");
                }
            }
        }
        return $dependencies;
    }