Driver.php 644 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Doctrine\DBAL\Driver\Mysqli;
  3. use Doctrine\DBAL\DBALException;
  4. use Doctrine\DBAL\Driver\AbstractMySQLDriver;
  5. class Driver extends AbstractMySQLDriver
  6. {
  7. /**
  8. * {@inheritdoc}
  9. */
  10. public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
  11. {
  12. try {
  13. return new MysqliConnection($params, $username, $password, $driverOptions);
  14. } catch (MysqliException $e) {
  15. throw DBALException::driverException($this, $e);
  16. }
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function getName()
  22. {
  23. return 'mysqli';
  24. }
  25. }