Files
Mangarr/src/Domain/Shared/Infrastructure/Messenger/SymfonyMessengerEventDispatcher.php

18 lines
436 B
PHP

<?php
namespace App\Domain\Shared\Infrastructure\Messenger;
use App\Domain\Shared\Domain\Contract\EventDispatcherInterface;
use Symfony\Component\Messenger\MessageBusInterface;
class SymfonyMessengerEventDispatcher implements EventDispatcherInterface
{
public function __construct(private MessageBusInterface $bus)
{
}
public function dispatch(object $event): void
{
$this->bus->dispatch($event);
}
}