<?php

namespace App\Domain\Scraping\Infrastructure\CommandHandler;

use App\Domain\Scraping\Application\Command\ScrapeChapter;
use App\Domain\Scraping\Application\CommandHandler\ScrapeChapterHandler;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;

#[AsMessageHandler]
class SymfonyScrapeChapterHandler
{
    public function __construct(
        private ScrapeChapterHandler $handler
    ) {
    }

    public function __invoke(ScrapeChapter $command): void
    {
        $this->handler->handle($command);
    }
}
