. */ declare(strict_types=1); namespace FireflyIII\Helpers\Attachments; use FireflyIII\Models\Attachment; use Illuminate\Support\Collection; use Illuminate\Support\MessageBag; /** * Interface AttachmentHelperInterface. */ interface AttachmentHelperInterface { /** * Get content of an attachment. */ public function getAttachmentContent(Attachment $attachment): string; /** * Get the location of an attachment. */ public function getAttachmentLocation(Attachment $attachment): string; /** * Get all attachments. */ public function getAttachments(): Collection; /** * Get all errors. */ public function getErrors(): MessageBag; /** * Get all messages/ */ public function getMessages(): MessageBag; /** * Uploads a file as a string. */ public function saveAttachmentFromApi(Attachment $attachment, string $content): bool; /** * Save attachments that got uploaded. */ public function saveAttachmentsForModel(object $model, ?array $files): bool; }