public static function GetInstance() { global $_CONFIG; if (self::$__instance == null) { include_once $_SERVER['DOCUMENT_ROOT'] . "/lib/database/" . strtolower($_CONFIG['CMS_DB_TYPE']) . ".php"; $db = new ReflectionClass($_CONFIG['CMS_DB_TYPE']); $get = $db->getMethod('GetInstance'); self::$__instance = $get->invoke(null); } return self::$__instance; }