MessageBusInterface.php 685 B

12345678910111213141516171819202122232425262728
  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;
  11. use Symfony\Component\Messenger\Stamp\StampInterface;
  12. /**
  13. * @author Samuel Roze <samuel.roze@gmail.com>
  14. */
  15. interface MessageBusInterface
  16. {
  17. /**
  18. * Dispatches the given message.
  19. *
  20. * @param object|Envelope $message The message or the message pre-wrapped in an envelope
  21. * @param StampInterface[] $stamps
  22. */
  23. public function dispatch($message, array $stamps = []): Envelope;
  24. }