$conn =
new PDO( $this->
buildDsn($info),
$info->username,
$info->password,
[ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
] );
$this->
setNonStrictSQLMode($conn);
$this->
checkVersion($conn);
$this->
checkEngineSupport($conn);
$this->
checkSQLMode($conn);
return $conn;
} protected function setNonStrictSQLMode(PDO
$conn) { $conn->
exec("SET @@session.sql_mode = ''"
);
}