ConnectionRegistry.php 882 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Doctrine\Persistence;
  3. /**
  4. * Contract covering connection for a Doctrine persistence layer ManagerRegistry class to implement.
  5. */
  6. interface ConnectionRegistry
  7. {
  8. /**
  9. * Gets the default connection name.
  10. *
  11. * @return string The default connection name.
  12. */
  13. public function getDefaultConnectionName();
  14. /**
  15. * Gets the named connection.
  16. *
  17. * @param string $name The connection name (null for the default one).
  18. *
  19. * @return object
  20. */
  21. public function getConnection($name = null);
  22. /**
  23. * Gets an array of all registered connections.
  24. *
  25. * @return object[] An array of Connection instances.
  26. */
  27. public function getConnections();
  28. /**
  29. * Gets all connection names.
  30. *
  31. * @return string[] An array of connection names.
  32. */
  33. public function getConnectionNames();
  34. }