for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace EventSauce\EventSourcing;
class MessageDispatcherChain implements MessageDispatcher
{
/**
* @var MessageDispatcher[]
*/
private array $dispatchers;
public function __construct(MessageDispatcher ...$dispatchers)
$this->dispatchers = $dispatchers;
}
public function dispatch(Message ...$messages): void
foreach ($this->dispatchers as $dispatcher) {
$dispatcher->dispatch(...$messages);