public static function invokeMethod($func, array &$params = array()) {
        list($class, $method) = $func;

        $instance = is_object($class);
		
        switch (count($params)) {
            case 0:
                return ($instance) ?
                    $class->$method() :
                    $class::$method();
            case 1:
                return ($instance) ?
                    $class->$method($params[0]) :
                    $class::$method($params[0]);
            case 2:
                return ($instance) ?
                    $class->$method($params[0], $params[1]) :
                    $class::$method($params[0], $params[1]);
            case 3:
                return ($instance) ?
                    $class->$method($params[0], $params[1], $params[2]) :
                    $class::$method($params[0], $params[1], $params[2]);
            case 4:
                return ($instance) ?
                    $class->$method($params[0], $params[1], $params[2], $params[3]) :
                    $class::$method($params[0], $params[1], $params[2], $params[3]);
            case 5:
                return ($instance) ?
                    $class->$method($params[0], $params[1], $params[2], $params[3], $params[4]) :
                    $class::$method($params[0], $params[1], $params[2], $params[3], $params[4]);
            default:
                return call_user_func_array($func, $params);
        }
    }
public static function invokeMethod($func, array &$params = array()) {
        list($class, $method) = $func;

        $instance = is_object($class);
		
        switch (count($params)) {
            case 0:
                return ($instance) ?
                    $class->$method() :
                    $class::$method();
            case 1:
                return ($instance) ?
                    $class->$method($params[0]) :
                    $class::$method($params[0]);
            case 2:
                return ($instance) ?
                    $class->$method($params[0], $params[1]) :
                    $class::$method($params[0], $params[1]);
            case 3:
                return ($instance) ?
                    $class->$method($params[0], $params[1], $params[2]) :
                    $class::$method($params[0], $params[1], $params[2]);
            case 4:
                return ($instance) ?
                    $class->$method($params[0], $params[1], $params[2], $params[3]) :
                    $class::$method($params[0], $params[1], $params[2], $params[3]);
            case 5:
                return ($instance) ?
                    $class->$method($params[0], $params[1], $params[2], $params[3], $params[4]) :
                    $class::$method($params[0], $params[1], $params[2], $params[3], $params[4]);
            default:
                return call_user_func_array($func, $params);
        }
    }
public static function invokeMethod ( $ func , array & $ params = array ( ) ) { list ( $ class , $ method ) = $ func ; $ instance = is_object ( $ class ) ; switch ( count ( $ params ) ) { case 0 : return ( $ instance ) ? $ class -> $ method ( ) : $ class :: $ method ( ) ; case 1 : return ( $ instance ) ? $ class -> $ method ( $ params [ 0 ] ) : $ class :: $ method ( $ params [ 0 ] ) ; case 2 : return ( $ instance ) ? $ class -> $ method ( $ params [ 0 ] , $ params [ 1 ] ) : $ class :: $ method ( $ params [ 0 ] , $ params [ 1 ] ) ; case 3 : return ( $ instance ) ? $ class -> $ method ( $ params [ 0 ] , $ params [ 1 ] , $ params [ 2 ] ) : $ class :: $ method ( $ params [ 0 ] , $ params [ 1 ] , $ params [ 2 ] ) ; case 4 : return ( $ instance ) ? $ class -> $ method ( $ params [ 0 ] , $ params [ 1 ] , $ params [ 2 ] , $ params [ 3 ] ) : $ class :: $ method ( $ params [ 0 ] , $ params [ 1 ] , $ params [ 2 ] , $ params [ 3 ] ) ; case 5 : return ( $ instance ) ? $ class -> $ method ( $ params [ 0 ] , $ params [ 1 ] , $ params [ 2 ] , $ params [ 3 ] , $ params [ 4 ] ) : $ class :: $ method ( $ params [ 0 ] , $ params [ 1 ] , $ params [ 2 ] , $ params [ 3 ] , $ params [ 4 ] ) ; default : return call_user_func_array ( $ func , $ params ) ; } }
Invokes a method.

@param mixed $func Class method
@param array $params Class method parameters
@return mixed Function results
Invokes a method .