Driver.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace Doctrine\DBAL\Driver\DrizzlePDOMySql;
  3. use Doctrine\DBAL\Platforms\DrizzlePlatform;
  4. use Doctrine\DBAL\Schema\DrizzleSchemaManager;
  5. /**
  6. * Drizzle driver using PDO MySql.
  7. */
  8. class Driver extends \Doctrine\DBAL\Driver\PDOMySql\Driver
  9. {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
  14. {
  15. return new Connection(
  16. $this->constructPdoDsn($params),
  17. $username,
  18. $password,
  19. $driverOptions
  20. );
  21. }
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public function createDatabasePlatformForVersion($version)
  26. {
  27. return $this->getDatabasePlatform();
  28. }
  29. /**
  30. * {@inheritdoc}
  31. */
  32. public function getDatabasePlatform()
  33. {
  34. return new DrizzlePlatform();
  35. }
  36. /**
  37. * {@inheritdoc}
  38. */
  39. public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
  40. {
  41. return new DrizzleSchemaManager($conn);
  42. }
  43. /**
  44. * {@inheritdoc}
  45. */
  46. public function getName()
  47. {
  48. return 'drizzle_pdo_mysql';
  49. }
  50. }