<?php

namespace ReloadifyScoped\Doctrine\DBAL\Driver\Mysqli;

use ReloadifyScoped\Doctrine\DBAL\Driver\AbstractMySQLDriver;
use ReloadifyScoped\Doctrine\DBAL\Exception;
use ReloadifyScoped\Doctrine\Deprecations\Deprecation;
class Driver extends AbstractMySQLDriver
{
    /**
     * {@inheritdoc}
     */
    public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
    {
        try {
            return new Connection($params, (string) $username, (string) $password, $driverOptions);
        } catch (MysqliException $e) {
            throw Exception::driverException($this, $e);
        }
    }
    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        Deprecation::trigger('doctrine/dbal', 'https://github.com/doctrine/dbal/issues/3580', 'Driver::getName() is deprecated');
        return 'mysqli';
    }
}
