db = new \PDO($dsn, $user, $password, [ \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, \PDO::MYSQL_ATTR_INIT_COMMAND => "SET sql_mode = '".self::SQL_MODE."'", ]); } public function __destruct() { unset($this->db); } /** @codeCoverageIgnore */ public static function create(): \JKingWeb\Arsse\Db\Driver { if (self::requirementsMet()) { return new self; } elseif (Driver::requirementsMet()) { return new Driver; } else { throw new Exception("extMissing", self::driverName()); } } public static function driverName(): string { return Arsse::$lang->msg("Driver.Db.MySQLPDO.Name"); } }