public static function static_function($plugin, $function) {
        global $CFG;

        //check that the plugin exists
        $typedirectory = $CFG->dirroot . '/repository/'. $plugin . '/lib.php';
        if (!file_exists($typedirectory)) {
            //throw new repository_exception('invalidplugin', 'repository');
            return false;
        }

        $args = func_get_args();
        if (count($args) <= 2) {
            $args = array();
        } else {
            array_shift($args);
            array_shift($args);
        }

        require_once($typedirectory);
        return call_user_func_array(array('repository_' . $plugin, $function), $args);
    }
public static function static_function($plugin, $function) {
        global $CFG;

        //check that the plugin exists
        $typedirectory = $CFG->dirroot . '/repository/'. $plugin . '/lib.php';
        if (!file_exists($typedirectory)) {
            //throw new repository_exception('invalidplugin', 'repository');
            return false;
        }

        $args = func_get_args();
        if (count($args) <= 2) {
            $args = array();
        } else {
            array_shift($args);
            array_shift($args);
        }

        require_once($typedirectory);
        return call_user_func_array(array('repository_' . $plugin, $function), $args);
    }
public static function static_function ( $ plugin , $ function ) { global $ CFG ; //check that the plugin exists $ typedirectory = $ CFG -> dirroot . '/repository/' . $ plugin . '/lib.php' ; if ( ! file_exists ( $ typedirectory ) ) { //throw new repository_exception('invalidplugin', 'repository'); return false ; } $ args = func_get_args ( ) ; if ( count ( $ args ) <= 2 ) { $ args = array ( ) ; } else { array_shift ( $ args ) ; array_shift ( $ args ) ; } require_once ( $ typedirectory ) ; return call_user_func_array ( array ( 'repository_' . $ plugin , $ function ) , $ args ) ; }
Call a static function. Any additional arguments than plugin and function will be passed through.

@static
@param string $plugin repository plugin name
@param string $function function name
@return mixed
Call a static function . Any additional arguments than plugin and function will be passed through .