Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame^] | 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Ddeboer\Imap; |
| 6 | |
| 7 | /** |
| 8 | * An IMAP message (e-mail). |
| 9 | */ |
| 10 | interface MessageInterface extends Message\BasicMessageInterface |
| 11 | { |
| 12 | /** |
| 13 | * Get raw part content. |
| 14 | */ |
| 15 | public function getContent(): string; |
| 16 | |
| 17 | /** |
| 18 | * Get message recent flag value (from headers). |
| 19 | */ |
| 20 | public function isRecent(): ?string; |
| 21 | |
| 22 | /** |
| 23 | * Get message unseen flag value (from headers). |
| 24 | */ |
| 25 | public function isUnseen(): bool; |
| 26 | |
| 27 | /** |
| 28 | * Get message flagged flag value (from headers). |
| 29 | */ |
| 30 | public function isFlagged(): bool; |
| 31 | |
| 32 | /** |
| 33 | * Get message answered flag value (from headers). |
| 34 | */ |
| 35 | public function isAnswered(): bool; |
| 36 | |
| 37 | /** |
| 38 | * Get message deleted flag value (from headers). |
| 39 | */ |
| 40 | public function isDeleted(): bool; |
| 41 | |
| 42 | /** |
| 43 | * Get message draft flag value (from headers). |
| 44 | */ |
| 45 | public function isDraft(): bool; |
| 46 | |
| 47 | /** |
| 48 | * Has the message been marked as read? |
| 49 | */ |
| 50 | public function isSeen(): bool; |
| 51 | |
| 52 | /** |
| 53 | * Mark message as seen. |
| 54 | * |
| 55 | * @deprecated since version 1.1, to be removed in 2.0 |
| 56 | */ |
| 57 | public function maskAsSeen(): bool; |
| 58 | |
| 59 | /** |
| 60 | * Mark message as seen. |
| 61 | */ |
| 62 | public function markAsSeen(): bool; |
| 63 | |
| 64 | /** |
| 65 | * Move message to another mailbox. |
| 66 | */ |
| 67 | public function copy(MailboxInterface $mailbox): void; |
| 68 | |
| 69 | /** |
| 70 | * Move message to another mailbox. |
| 71 | */ |
| 72 | public function move(MailboxInterface $mailbox): void; |
| 73 | |
| 74 | /** |
| 75 | * Delete message. |
| 76 | */ |
| 77 | public function delete(): void; |
| 78 | |
| 79 | /** |
| 80 | * Undelete message. |
| 81 | */ |
| 82 | public function undelete(): void; |
| 83 | |
| 84 | /** |
| 85 | * Set Flag Message. |
| 86 | * |
| 87 | * @param string $flag \Seen, \Answered, \Flagged, \Deleted, and \Draft |
| 88 | */ |
| 89 | public function setFlag(string $flag): bool; |
| 90 | |
| 91 | /** |
| 92 | * Clear Flag Message. |
| 93 | * |
| 94 | * @param string $flag \Seen, \Answered, \Flagged, \Deleted, and \Draft |
| 95 | */ |
| 96 | public function clearFlag(string $flag): bool; |
| 97 | } |