public function connect(array $params, $username, $passwd)
{
$link = mysqli_init();
set_error_handler(function () {
});
if (!$link->real_connect($params['host'], $username, $passwd, $params['dbname'])) {
restore_error_handler();
throw new MysqliException($link->connect_error, $link->connect_errno);
}
restore_error_handler();
$this->logger->debug(sprintf('Connected to %s.', $this->info($link)));
return $link;
}