blob: 286e188851838d20350c8e8730070d681854b7ec [file] [log] [blame]
<?php
declare(strict_types=1);
namespace Ddeboer\Imap\Message;
use Ddeboer\Imap\Exception\NotEmbeddedMessageException;
/**
* An e-mail attachment.
*/
interface AttachmentInterface extends PartInterface
{
/**
* Get attachment filename.
*/
public function getFilename(): ?string;
/**
* Get attachment file size.
*
* @return null|int Number of bytes
*/
public function getSize();
/**
* Is this attachment also an Embedded Message?
*/
public function isEmbeddedMessage(): bool;
/**
* Return embedded message.
*
* @throws NotEmbeddedMessageException
*
* @return EmbeddedMessageInterface<PartInterface>
*/
public function getEmbeddedMessage(): EmbeddedMessageInterface;
}