protected static function get_db() { global $phpbb_root_path, $phpEx; // so we don't reopen an open connection if (!self::$db instanceof \phpbb\db\driver\driver_interface) { $dbms = self::$config['dbms']; /** @var \phpbb\db\driver\driver_interface $db */ $db = new $dbms(); $db->sql_connect(self::$config['dbhost'], self::$config['dbuser'], self::$config['dbpasswd'], self::$config['dbname'], self::$config['dbport']); self::$db = $db; } return self::$db; }