VersionAwarePlatformDriver.php 931 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Doctrine\DBAL;
  3. use Doctrine\DBAL\Platforms\AbstractPlatform;
  4. /**
  5. * Contract for a driver that is able to create platform instances by version.
  6. *
  7. * Doctrine uses different platform classes for different vendor versions to
  8. * support the correct features and SQL syntax of each version.
  9. * This interface should be implemented by drivers that are capable to do this
  10. * distinction.
  11. */
  12. interface VersionAwarePlatformDriver
  13. {
  14. /**
  15. * Factory method for creating the appropriate platform instance for the given version.
  16. *
  17. * @param string $version The platform/server version string to evaluate. This should be given in the notation
  18. * the underlying database vendor uses.
  19. *
  20. * @return AbstractPlatform
  21. *
  22. * @throws Exception If the given version string could not be evaluated.
  23. */
  24. public function createDatabasePlatformForVersion($version);
  25. }