public static function fetchArguments($_class = null, $_method = null, $args = null)
    {
        if (empty($_class) || empty($_method)) {
            return null;
        }
        $args_def = array();
        if (!empty($args)) {
            $analyze = new ReflectionMethod($_class, $_method);
            foreach($analyze->getParameters() as $_param) {
                $arg_index = $_param->getName();
                $args_def[$_param->getPosition()] = isset($args[$arg_index]) ?
                    $args[$arg_index] : ( $_param->isOptional() ? $_param->getDefaultValue() : null );
            }
        }
        return call_user_func_array( array($_class, $_method), $args_def );
    }
public static function fetchArguments($_class = null, $_method = null, $args = null)
    {
        if (empty($_class) || empty($_method)) {
            return null;
        }
        $args_def = array();
        if (!empty($args)) {
            $analyze = new ReflectionMethod($_class, $_method);
            foreach($analyze->getParameters() as $_param) {
                $arg_index = $_param->getName();
                $args_def[$_param->getPosition()] = isset($args[$arg_index]) ?
                    $args[$arg_index] : ( $_param->isOptional() ? $_param->getDefaultValue() : null );
            }
        }
        return call_user_func_array( array($_class, $_method), $args_def );
    }
public static function fetchArguments ( $ _class = null , $ _method = null , $ args = null ) { if ( empty ( $ _class ) || empty ( $ _method ) ) { return null ; } $ args_def = array ( ) ; if ( ! empty ( $ args ) ) { $ analyze = new ReflectionMethod ( $ _class , $ _method ) ; foreach ( $ analyze -> getParameters ( ) as $ _param ) { $ arg_index = $ _param -> getName ( ) ; $ args_def [ $ _param -> getPosition ( ) ] = isset ( $ args [ $ arg_index ] ) ? $ args [ $ arg_index ] : ( $ _param -> isOptional ( ) ? $ _param -> getDefaultValue ( ) : null ) ; } } return call_user_func_array ( array ( $ _class , $ _method ) , $ args_def ) ; }
Launch a class's method fetching arguments

@param string $_class The class name
@param string $_method The class method name
@param mixed $args A set of arguments to fetch
@return mixed
Launch a class s method fetching arguments