Files
torsearch/src/Search/Action/Input/GetMediaInfoInput.php

26 lines
718 B
PHP

<?php
namespace App\Search\Action\Input;
use App\Download\Action\Command\DownloadMediaCommand;
use App\Search\Action\Command\GetMediaInfoCommand;
use OneToMany\RichBundle\Attribute\SourceRoute;
use OneToMany\RichBundle\Contract\CommandInterface;
use OneToMany\RichBundle\Contract\InputInterface;
/** @implements InputInterface<GetMediaInfoInput> */
class GetMediaInfoInput implements InputInterface
{
public function __construct(
#[SourceRoute('tmdbId')]
public string $tmdbId,
#[SourceRoute('mediaType')]
public string $mediaType,
) {}
public function toCommand(): CommandInterface
{
return new GetMediaInfoCommand($this->tmdbId, $this->mediaType);
}
}