AbstractDB2Driver.php 796 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Doctrine\DBAL\Driver;
  3. use Doctrine\DBAL\Connection;
  4. use Doctrine\DBAL\Driver;
  5. use Doctrine\DBAL\Platforms\DB2Platform;
  6. use Doctrine\DBAL\Schema\DB2SchemaManager;
  7. /**
  8. * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for IBM DB2 based drivers.
  9. */
  10. abstract class AbstractDB2Driver implements Driver
  11. {
  12. /**
  13. * {@inheritdoc}
  14. */
  15. public function getDatabase(Connection $conn)
  16. {
  17. $params = $conn->getParams();
  18. return $params['dbname'];
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function getDatabasePlatform()
  24. {
  25. return new DB2Platform();
  26. }
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function getSchemaManager(Connection $conn)
  31. {
  32. return new DB2SchemaManager($conn);
  33. }
  34. }