25 lines
605 B
PHP
25 lines
605 B
PHP
<?php
|
|
|
|
namespace App\Monitor\Action\Input;
|
|
|
|
use App\Monitor\Action\Command\MonitorMovieCommand;
|
|
use OneToMany\RichBundle\Attribute\SourceRoute;
|
|
use OneToMany\RichBundle\Contract\CommandInterface;
|
|
use OneToMany\RichBundle\Contract\InputInterface;
|
|
|
|
class MonitorMovieInput implements InputInterface
|
|
{
|
|
public function __construct(
|
|
#[SourceRoute('tmdbId')]
|
|
public string $tmdbId,
|
|
|
|
#[SourceRoute('imdbId')]
|
|
public string $imdbId,
|
|
) {}
|
|
|
|
public function toCommand(): CommandInterface
|
|
{
|
|
return new MonitorMovieCommand($this->tmdbId, $this->imdbId);
|
|
}
|
|
}
|