Driver.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. * @deprecated
  9. */
  10. class Driver extends \Doctrine\DBAL\Driver\PDOMySql\Driver
  11. {
  12. /**
  13. * {@inheritdoc}
  14. */
  15. public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
  16. {
  17. return new Connection(
  18. $this->constructPdoDsn($params),
  19. $username,
  20. $password,
  21. $driverOptions
  22. );
  23. }
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public function createDatabasePlatformForVersion($version)
  28. {
  29. return $this->getDatabasePlatform();
  30. }
  31. /**
  32. * {@inheritdoc}
  33. *
  34. * @return DrizzlePlatform
  35. */
  36. public function getDatabasePlatform()
  37. {
  38. return new DrizzlePlatform();
  39. }
  40. /**
  41. * {@inheritdoc}
  42. *
  43. * @return DrizzleSchemaManager
  44. */
  45. public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
  46. {
  47. return new DrizzleSchemaManager($conn);
  48. }
  49. /**
  50. * {@inheritdoc}
  51. *
  52. * @deprecated
  53. */
  54. public function getName()
  55. {
  56. return 'drizzle_pdo_mysql';
  57. }
  58. }