public static function getInstance($class_name)
    {
        // get class reflector
        $reflector = new ReflectionClass($class_name);
        // get constructor
        $constructor = $reflector->getConstructor();
        // create di params
        $di_params = $constructor ? self::_getDiParams($constructor->getParameters()) : [];
        // create instance
        return $reflector->newInstanceArgs($di_params);
    }
public static function getInstance($class_name)
    {
        // get class reflector
        $reflector = new ReflectionClass($class_name);
        // get constructor
        $constructor = $reflector->getConstructor();
        // create di params
        $di_params = $constructor ? self::_getDiParams($constructor->getParameters()) : [];
        // create instance
        return $reflector->newInstanceArgs($di_params);
    }
public static function getInstance ( $ class_name ) { // get class reflector $ reflector = new ReflectionClass ( $ class_name ) ; // get constructor $ constructor = $ reflector -> getConstructor ( ) ; // create di params $ di_params = $ constructor ? self :: _getDiParams ( $ constructor -> getParameters ( ) ) : [ ] ; // create instance return $ reflector -> newInstanceArgs ( $ di_params ) ; }
get Instance from reflection info.

@param  string  $class_name
@return object
get Instance from reflection info .