protected function get_db()
{
// so we don't reopen an open connection
if (!$this->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']);
$this->db = $db;
}
return $this->db;
}