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