lib/Context.php
public function determineParamValuesForConstructor($className)
    {
        $reflection = new \ReflectionClass($className);
        $instance = $reflection->newInstanceWithoutConstructor();
        $callable = [$instance, '__construct'];

        if (!is_callable($callable)) {
            // This class does not have a constructor function
            return [];
        }

        return $this->determineParamValues($callable);
    }
public function determineParamValuesForConstructor($className)
    {
        $reflection = new \ReflectionClass($className);
        $instance = $reflection->newInstanceWithoutConstructor();
        $callable = [$instance, '__construct'];

        if (!is_callable($callable)) {
            // This class does not have a constructor function
            return [];
        }

        return $this->determineParamValues($callable);
    }
public function determineParamValuesForConstructor ( $ className ) { $ reflection = new \ ReflectionClass ( $ className ) ; $ instance = $ reflection -> newInstanceWithoutConstructor ( ) ; $ callable = [ $ instance , '__construct' ] ; if ( ! is_callable ( $ callable ) ) { // This class does not have a constructor function return [ ] ; } return $ this -> determineParamValues ( $ callable ) ; }
Given a class and the current context, attempt to determine the appropriate list of parameters to pass to the
constructor when it is called.

@param $className
@return array
Given a class and the current context attempt to determine the appropriate list of parameters to pass to the constructor when it is called .