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