array($this, 'handler_'.$fun), 'auth' => $auth, 'perms' => $perms, 'type' => $type); } /* static functions */ public static function factory($modname) { global $globals; if ($modname == 'core') { $mod_path = $globals->spoolroot . '/core/modules/' . $modname . '.php'; } else { $mod_path = $globals->spoolroot . '/modules/' . $modname . '.php'; } $class = ucfirst($modname) . 'Module'; require_once $mod_path; return new $class(); } } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>