| 1 | <?php |
||
| 16 | class QueueEventBus implements EventBus |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var EventQueue |
||
| 20 | */ |
||
| 21 | private $queue; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param EventQueue $queue |
||
| 25 | */ |
||
| 26 | 2 | public function __construct(EventQueue $queue) |
|
| 30 | |||
| 31 | /** |
||
| 32 | * Publishes the event into queue. |
||
| 33 | * |
||
| 34 | * @param Event $event |
||
| 35 | */ |
||
| 36 | 1 | public function publish(Event $event) |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @param AggregateEvents $aggregator |
||
| 43 | */ |
||
| 44 | 1 | public function pullAndPublish(AggregateEvents $aggregator) |
|
| 50 | } |
||
| 51 |