public function getResolveDependencies($parameters, $params)
    {
        $dependencies = [];
        foreach ($parameters as $parameter) {
            // get the type hinted class
            $dependency = $parameter->getClass();
            if ($dependency === null) {
                // check if default value for a parameter is available
                if ($parameter->isDefaultValueAvailable()) {
                    // get default value of parameter
                    $dependencies[] = $parameter->getDefaultValue();
                } else {
                    if (empty($params[$parameter->name])) {
                        throw new \Exception("Can not resolve class dependency {$parameter->name}", 500);
                    }
                    $dependencies[] = $params[$parameter->name];
                }
            } else {
                // get dependency resolved
                $this->loader = $dependency->name;
                $dependencies[] = $this->get($dependency->name);
            }
        }

        return $dependencies;
    }
public function getResolveDependencies($parameters, $params)
    {
        $dependencies = [];
        foreach ($parameters as $parameter) {
            // get the type hinted class
            $dependency = $parameter->getClass();
            if ($dependency === null) {
                // check if default value for a parameter is available
                if ($parameter->isDefaultValueAvailable()) {
                    // get default value of parameter
                    $dependencies[] = $parameter->getDefaultValue();
                } else {
                    if (empty($params[$parameter->name])) {
                        throw new \Exception("Can not resolve class dependency {$parameter->name}", 500);
                    }
                    $dependencies[] = $params[$parameter->name];
                }
            } else {
                // get dependency resolved
                $this->loader = $dependency->name;
                $dependencies[] = $this->get($dependency->name);
            }
        }

        return $dependencies;
    }
public function getResolveDependencies ( $ parameters , $ params ) { $ dependencies = [ ] ; foreach ( $ parameters as $ parameter ) { // get the type hinted class $ dependency = $ parameter -> getClass ( ) ; if ( $ dependency === null ) { // check if default value for a parameter is available if ( $ parameter -> isDefaultValueAvailable ( ) ) { // get default value of parameter $ dependencies [ ] = $ parameter -> getDefaultValue ( ) ; } else { if ( empty ( $ params [ $ parameter -> name ] ) ) { throw new \ Exception ( "Can not resolve class dependency {$parameter->name}" , 500 ) ; } $ dependencies [ ] = $ params [ $ parameter -> name ] ; } } else { // get dependency resolved $ this -> loader = $ dependency -> name ; $ dependencies [ ] = $ this -> get ( $ dependency -> name ) ; } } return $ dependencies ; }
Get all dependencies resolved.

@param (array) $parameters required params
@param (array) $params     constructure args.

@since 3.0.0

@return array
Get all dependencies resolved .