/
AleksWork
/
diary_plants
Обзор
Документация
Войти
/
AleksWork
/
diary_plants
Код
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/Domain/Repository/AttachmentRepositoryInterface.php
31 строка
2 KB
AlexeySerov
Add vote to Attachment managers
14 май 2026, 14:29
14 май 2026, 14:29
a500770
Код
Авторство
О чём код?
<?php namespace App\Domain\Repository; use DateTimeImmutable; use App\Domain\Entity\Attachment; use App\Domain\Model\Attachment\AttachmentModel; interface AttachmentRepositoryInterface { public function findByAttachable(string $attachableType, int $attachableId): array; public function findEntitiesByAttachable(string $attachableType, int $attachableId): array; public function findByAttachableWithDeleted(string $attachableType, int $attachableId): array; public function findOneByAttachable(string $attachableType, int $attachableId, int $attachmentId): ?Attachment; public function deleteByAttachable(string $attachableType, int $attachableId, int $attachmentId): void; public function getAttachmentsPaginated(int $page, int $perPage): array; public function getAttachmentsPaginatedByGroupId(int $page, int $perPage, ?int $groupId = null): array; public function find(int $attachmentId): ?Attachment; public function findModel(int $attachmentId): ?AttachmentModel; public function findAll(): array; public function findAllByGroupId(?int $groupId = null): array; public function findAllWithTargets(): array; public function findAttachmentsByTitle(string $title): array; public function findAttachmentsByFilename(string $filename): array; public function findAttachmentsByFileDate(DateTimeImmutable $fileDate): array; public function findAttachmentsByPath(string $path): array; public function create(Attachment $attachment): int; public function update(): void; public function remove(Attachment $attachment): void; public function toModel(Attachment $attachment, bool $addRelations = false): AttachmentModel; }