1 | <?php |
||
16 | class PersistsMessages implements MessageBusMiddleware |
||
17 | { |
||
18 | /** |
||
19 | * @var ObjectManager |
||
20 | */ |
||
21 | private $om; |
||
22 | |||
23 | /** |
||
24 | * @var LoggerInterface |
||
25 | */ |
||
26 | private $logger; |
||
27 | |||
28 | /** |
||
29 | * @var bool |
||
30 | */ |
||
31 | private $persistCommands; |
||
32 | |||
33 | /** |
||
34 | * @var bool |
||
35 | */ |
||
36 | private $persistEvents; |
||
37 | |||
38 | /** |
||
39 | * PersistsMessages constructor. |
||
40 | * |
||
41 | * @param LoggerInterface $logger |
||
42 | * @param ObjectManager $om |
||
43 | * @param bool $persistCommands |
||
44 | * @param bool $persistEvents |
||
45 | */ |
||
46 | public function __construct(LoggerInterface $logger, ObjectManager $om, $persistCommands, $persistEvents) |
||
53 | |||
54 | /** |
||
55 | * @param Message $message |
||
56 | * @param callable $next |
||
57 | */ |
||
58 | public function handle($message, callable $next) |
||
70 | } |
||
71 |