Download src/Preset/Application/CommandHandlers/ReadPresetCommandHandler.php from pnacorp/AIKEEDO: direct link, hf CLI and curl.
- Browser
- Download file 593 Bytes
-
https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Preset/Application/CommandHandlers/ReadPresetCommandHandler.php
- Command line
-
hf download hf://pnacorp/AIKEEDO/src/Preset/Application/CommandHandlers/ReadPresetCommandHandler.php
-
curl -L -o ReadPresetCommandHandler.php https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Preset/Application/CommandHandlers/ReadPresetCommandHandler.php
593 Bytes
| declare(strict_types=1); | |
| namespace Preset\Application\CommandHandlers; | |
| use Preset\Application\Commands\ReadPresetCommand; | |
| use Preset\Domain\Entities\PresetEntity; | |
| use Preset\Domain\Exceptions\PresetNotFoundException; | |
| use Preset\Domain\Repositories\PresetRepositoryInterface; | |
| class ReadPresetCommandHandler | |
| { | |
| public function __construct( | |
| private PresetRepositoryInterface $repo | |
| ) { | |
| } | |
| /** | |
| * @throws PresetNotFoundException | |
| */ | |
| public function handle(ReadPresetCommand $cmd): PresetEntity | |
| { | |
| return $this->repo->ofId($cmd->id);; | |
| } | |
| } | |