public function set_config_function($function) {
        $configname = 'yui' . (count($this->jsconfigfunctions) + 1) . 'ConfigFn';
        if (isset($this->jsconfigfunctions[$configname])) {
            throw new coding_exception("A YUI config function with this name already exists. Config function names must be unique.");
        }
        $this->jsconfigfunctions[$configname] = $function;
        return '@' . $configname . '@';
    }