<?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);
    }
}
