24 lines
638 B
PHP
24 lines
638 B
PHP
<?php
|
|
|
|
namespace App\Download\Action\Input;
|
|
|
|
use App\Download\Action\Command\PauseDownloadCommand;
|
|
use OneToMany\RichBundle\Attribute\SourceRoute;
|
|
use OneToMany\RichBundle\Contract\CommandInterface;
|
|
use OneToMany\RichBundle\Contract\InputInterface;
|
|
|
|
/** @implements InputInterface<PauseDownloadInput, PauseDownloadCommand> */
|
|
class ResumeDownloadInput implements InputInterface
|
|
{
|
|
public function __construct(
|
|
#[SourceRoute('downloadId')]
|
|
public int $downloadId,
|
|
) {}
|
|
|
|
public function toCommand(): CommandInterface
|
|
{
|
|
return new PauseDownloadCommand(
|
|
$this->downloadId,
|
|
);
|
|
}
|
|
} |