static function add($name, $need = 0) { if (isset(self::$modules[$name])) { return; } $path = sysPATH . $name . '/'; !file_exists($path) && self::download($name); if ($need) { self::$modules = array($name => 1) + self::$modules; } else { self::$modules[$name] = 1; } is_file($path . 'qg.php') && (require_once $path . 'qg.php'); self::$modules[$name] = array('init' => isset($init) ? $init : null, 'path' => $path); }