<?php
declare(strict_types=1);
namespace Bodymed\Webshop\Core\Subscriber\NomsSequence;
use Bodymed\Webshop\Event\NomsSequence\NomsSequenceMinimumThresholdUndercut;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Messenger\MessageBusInterface;
class NomsSequenceSubscriber implements EventSubscriberInterface
{
public function __construct(
private MessageBusInterface $messageBus
) {
}
public static function getSubscribedEvents(): array
{
return [
NomsSequenceMinimumThresholdUndercut::class => 'onThresholdUndercut',
];
}
public function onThresholdUndercut(NomsSequenceMinimumThresholdUndercut $event): void
{
$this->messageBus->dispatch($event);
}
}