ConnectionLoader.php 595 B

1234567891011121314151617181920212223
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\Migrations\Configuration\Connection;
  4. use Doctrine\DBAL\Connection;
  5. use Doctrine\Migrations\Configuration\Connection\Exception\ConnectionNotSpecified;
  6. /**
  7. * The ConnectionLoader defines the interface used to load the Doctrine\DBAL\Connection instance to use
  8. * for migrations.
  9. */
  10. interface ConnectionLoader
  11. {
  12. /**
  13. * Read the input and return a Connection, returns null if the config
  14. * is not supported.
  15. *
  16. * @throws ConnectionNotSpecified
  17. */
  18. public function getConnection(?string $name = null): Connection;
  19. }