Download src/Ai/Domain/Repositories/LibraryItemRepositoryInterface.php from pnacorp/AIKEEDO: direct link, hf CLI and curl.
- Browser
- Download file 2.59 kB
-
https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Ai/Domain/Repositories/LibraryItemRepositoryInterface.php
- Command line
-
hf download hf://pnacorp/AIKEEDO/src/Ai/Domain/Repositories/LibraryItemRepositoryInterface.php
-
curl -L -o LibraryItemRepositoryInterface.php https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Ai/Domain/Repositories/LibraryItemRepositoryInterface.php
2.59 kB
| declare(strict_types=1); | |
| namespace Ai\Domain\Repositories; | |
| use Ai\Domain\Entities\AbstractLibraryItemEntity; | |
| use Ai\Domain\Exceptions\LibraryItemNotFoundException; | |
| use Ai\Domain\ValueObjects\ItemType; | |
| use Ai\Domain\ValueObjects\Model; | |
| use Ai\Domain\ValueObjects\SortParameter; | |
| use Ai\Domain\ValueObjects\Visibility; | |
| use Iterator; | |
| use Shared\Domain\Repositories\RepositoryInterface; | |
| use Shared\Domain\ValueObjects\Id; | |
| use Shared\Domain\ValueObjects\SortDirection; | |
| use User\Domain\Entities\UserEntity; | |
| use Workspace\Domain\Entities\WorkspaceEntity; | |
| interface LibraryItemRepositoryInterface extends RepositoryInterface | |
| { | |
| /** | |
| * @param AbstractLibraryItemEntity $item | |
| * @return LibraryItemRepositoryInterface | |
| */ | |
| public function add(AbstractLibraryItemEntity $item): self; | |
| /** | |
| * @param AbstractLibraryItemEntity $item | |
| * @return LibraryItemRepositoryInterface | |
| */ | |
| public function remove(AbstractLibraryItemEntity $item): self; | |
| /** | |
| * @param Id $id | |
| * @return AbstractLibraryItemEntity | |
| * @throws LibraryItemNotFoundException | |
| */ | |
| public function ofId(Id $id): AbstractLibraryItemEntity; | |
| /** | |
| * @param Id|UserEntity $user | |
| * @param Visibility|Id|WorkspaceEntity $visibility | |
| * @return static | |
| */ | |
| public function filterByUser( | |
| Id|UserEntity $user, | |
| Visibility|Id|WorkspaceEntity $visibility = Visibility::PRIVATE | |
| ): static; | |
| /** | |
| * @param Id|WorkspaceEntity $workspace | |
| * @return static | |
| */ | |
| public function filterByWorkspace(Id|WorkspaceEntity $workspace): static; | |
| /** | |
| * @param ItemType $type | |
| * @return static | |
| */ | |
| public function filterByType(ItemType $type): static; | |
| /** | |
| * @param Model $model | |
| * @return static | |
| */ | |
| public function filterByModel(Model $model): static; | |
| /** | |
| * @param string $terms | |
| * @return static | |
| */ | |
| public function search(string $terms): static; | |
| /** | |
| * @param SortDirection $dir | |
| * @param null|SortParameter $sortParameter | |
| * @return static | |
| */ | |
| public function sort( | |
| SortDirection $dir, | |
| ?SortParameter $sortParameter = null | |
| ): static; | |
| /** | |
| * @param AbstractLibraryItemEntity $cursor | |
| * @return Iterator<AbstractLibraryItemEntity> | |
| */ | |
| public function startingAfter(AbstractLibraryItemEntity $cursor): Iterator; | |
| /** | |
| * @param AbstractLibraryItemEntity $cursor | |
| * @return Iterator<AbstractLibraryItemEntity> | |
| */ | |
| public function endingBefore(AbstractLibraryItemEntity $cursor): Iterator; | |
| } | |