refactor: mail interfaces
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -18,9 +18,18 @@ use KTXF\Resource\Provider\Node\NodePropertiesMutableInterface;
|
||||
* @since 2025.05.01
|
||||
*/
|
||||
interface MessagePropertiesMutableInterface extends MessagePropertiesBaseInterface, NodePropertiesMutableInterface {
|
||||
|
||||
public const JSON_TYPE = MessagePropertiesBaseInterface::JSON_TYPE;
|
||||
|
||||
/**
|
||||
* Sets the message size in bytes
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param int|null $value
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setSize(?int $value): static;
|
||||
|
||||
/**
|
||||
* Sets custom headers
|
||||
*
|
||||
@@ -56,15 +65,26 @@ interface MessagePropertiesMutableInterface extends MessagePropertiesBaseInterfa
|
||||
public function setUrid(?string $value): static;
|
||||
|
||||
/**
|
||||
* Sets the message date
|
||||
* Sets the message ID this is replying to
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param DateTimeImmutable $value
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setDate(DateTimeImmutable $value): static;
|
||||
public function setInReplyTo(?string $value): static;
|
||||
|
||||
/**
|
||||
* Sets the references (message IDs in thread)
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string ...$value
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setReferences(string ...$value): static;
|
||||
|
||||
/**
|
||||
* Sets the received date
|
||||
@@ -77,16 +97,16 @@ interface MessagePropertiesMutableInterface extends MessagePropertiesBaseInterfa
|
||||
*/
|
||||
public function setReceived(?DateTimeImmutable $value): static;
|
||||
|
||||
/**
|
||||
* Sets the message size in bytes
|
||||
/**
|
||||
* Sets the message date
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param int|null $value
|
||||
* @param DateTimeImmutable $value
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setSize(?int $value): static;
|
||||
public function setSent(DateTimeImmutable $value): static;
|
||||
|
||||
/**
|
||||
* Sets the sender address (actual sender, may differ from From)
|
||||
@@ -154,28 +174,6 @@ interface MessagePropertiesMutableInterface extends MessagePropertiesBaseInterfa
|
||||
*/
|
||||
public function setBcc(AddressInterface ...$value): static;
|
||||
|
||||
/**
|
||||
* Sets the message ID this is replying to
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setInReplyTo(?string $value): static;
|
||||
|
||||
/**
|
||||
* Sets the references (message IDs in thread)
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string ...$value
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setReferences(string ...$value): static;
|
||||
|
||||
/**
|
||||
* Sets the message subject
|
||||
*
|
||||
@@ -188,15 +186,15 @@ interface MessagePropertiesMutableInterface extends MessagePropertiesBaseInterfa
|
||||
public function setSubject(string $value): static;
|
||||
|
||||
/**
|
||||
* Sets the message snippet/preview
|
||||
* Sets the message body
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string|null $value
|
||||
* @param MessagePartInterface|null $value
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setSnippet(?string $value): static;
|
||||
public function setBody(?MessagePartInterface $value): static;
|
||||
|
||||
/**
|
||||
* Sets the plain text body content
|
||||
@@ -207,7 +205,7 @@ interface MessagePropertiesMutableInterface extends MessagePropertiesBaseInterfa
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setBodyText(?string $value): static;
|
||||
public function setBodyTextPlain(?string $value): static;
|
||||
|
||||
/**
|
||||
* Sets the HTML body content
|
||||
@@ -218,7 +216,7 @@ interface MessagePropertiesMutableInterface extends MessagePropertiesBaseInterfa
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setBodyHtml(?string $value): static;
|
||||
public function setBodyTextHtml(?string $value): static;
|
||||
|
||||
/**
|
||||
* Sets the attachments
|
||||
@@ -241,15 +239,28 @@ interface MessagePropertiesMutableInterface extends MessagePropertiesBaseInterfa
|
||||
* @return self
|
||||
*/
|
||||
public function addAttachment(AttachmentInterface $value): static;
|
||||
|
||||
/**
|
||||
* Sets message tags
|
||||
* Sets message flags
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param array{read: bool, starred: bool, important: bool, answered: bool, forwarded: bool, draft: bool, deleted: bool, flagged: bool} $value
|
||||
* @param array $value
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setFlags(array $value): static;
|
||||
|
||||
/**
|
||||
* Sets message flags
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string $label
|
||||
* @param bool $value
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setFlag(string $label, bool $value): static;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user