SendersLocatorInterface.php 736 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Messenger\Transport\Sender;
  11. use Symfony\Component\Messenger\Envelope;
  12. /**
  13. * Maps a message to a list of senders.
  14. *
  15. * @author Samuel Roze <samuel.roze@gmail.com>
  16. * @author Tobias Schultze <http://tobion.de>
  17. */
  18. interface SendersLocatorInterface
  19. {
  20. /**
  21. * Gets the senders for the given message name.
  22. *
  23. * @return iterable|SenderInterface[] Indexed by sender alias if available
  24. */
  25. public function getSenders(Envelope $envelope): iterable;
  26. }