-
-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathMessageBusInterface.php
More file actions
31 lines (27 loc) · 869 Bytes
/
MessageBusInterface.php
File metadata and controls
31 lines (27 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Messenger;
use Symfony\Component\Messenger\Exception\ExceptionInterface;
use Symfony\Component\Messenger\Stamp\StampInterface;
/**
* @author Samuel Roze <samuel.roze@gmail.com>
*/
interface MessageBusInterface
{
/**
* Dispatches the given message.
*
* @param object|Envelope $message The message or the message pre-wrapped in an envelope
* @param StampInterface[] $stamps Stamps set on the Envelope which are used to control middleware behavior
*
* @throws ExceptionInterface
*/
public function dispatch(object $message, array $stamps = []): Envelope;
}