Download src/Ai/Application/Commands/DeleteLibraryItemCommand.php from pnacorp/AIKEEDO: direct link, hf CLI and curl.
- Browser
- Download file 612 Bytes
-
https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Ai/Application/Commands/DeleteLibraryItemCommand.php
- Command line
-
hf download hf://pnacorp/AIKEEDO/src/Ai/Application/Commands/DeleteLibraryItemCommand.php
-
curl -L -o DeleteLibraryItemCommand.php https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Ai/Application/Commands/DeleteLibraryItemCommand.php
612 Bytes
| declare(strict_types=1); | |
| namespace Ai\Application\Commands; | |
| use Ai\Application\CommandHandlers\DeleteLibraryItemCommandHandler; | |
| use Ai\Domain\Entities\AbstractLibraryItemEntity; | |
| use Shared\Domain\ValueObjects\Id; | |
| use Shared\Infrastructure\CommandBus\Attributes\Handler; | |
| (DeleteLibraryItemCommandHandler::class) | |
| class DeleteLibraryItemCommand | |
| { | |
| public Id|AbstractLibraryItemEntity $item; | |
| public function __construct(string|AbstractLibraryItemEntity $item) | |
| { | |
| $this->item = $item instanceof AbstractLibraryItemEntity | |
| ? $item | |
| : new Id($item); | |
| } | |
| } | |