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\Message; |
| 6 | |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 7 | use Ddeboer\Imap\Exception\NotEmbeddedMessageException; |
| 8 | |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 9 | /** |
| 10 | * An e-mail attachment. |
| 11 | */ |
| 12 | interface AttachmentInterface extends PartInterface |
| 13 | { |
| 14 | /** |
| 15 | * Get attachment filename. |
| 16 | */ |
| 17 | public function getFilename(): ?string; |
| 18 | |
| 19 | /** |
| 20 | * Get attachment file size. |
| 21 | * |
| 22 | * @return null|int Number of bytes |
| 23 | */ |
| 24 | public function getSize(); |
| 25 | |
| 26 | /** |
| 27 | * Is this attachment also an Embedded Message? |
| 28 | */ |
| 29 | public function isEmbeddedMessage(): bool; |
| 30 | |
| 31 | /** |
| 32 | * Return embedded message. |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 33 | * |
| 34 | * @throws NotEmbeddedMessageException |
| 35 | * |
| 36 | * @return EmbeddedMessageInterface<PartInterface> |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 37 | */ |
| 38 | public function getEmbeddedMessage(): EmbeddedMessageInterface; |
| 39 | } |