AttachmentStorage
Corex\Security\Upload\AttachmentStorage · interface · Core layer
Somewhere an uploaded file can be put and later referred to (spec 081). An interface rather than the concrete {@see AttachmentStore} because storing a file is a filesystem-and-WordPress boundary, and the services that use it — ApplicationService, the forms submission pipeline — have logic worth testing that has nothing to do with where bytes land. This is the same seam Mailer and ApplicationStore already draw in this codebase, for the same reason.
Public API
Section titled “Public API”store(array $file, string $context): AttachmentResult
Section titled “store(array $file, string $context): AttachmentResult”forget(int $attachmentId): bool
Section titled “forget(int $attachmentId): bool”Remove a stored file. Implementations MUST refuse ids they did not create.