generated from Nodarx/template
feat: implement content cache
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -16,6 +16,7 @@ final class Message
|
||||
* @param list<MessageAddress> $bcc
|
||||
* @param array<string, string> $bodySections
|
||||
* @param list<string> $references message ids from the References header, without angle brackets
|
||||
* @param list<string> $truncatedSections part ids of text sections cut off by a partial fetch
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly int $sequence,
|
||||
@@ -37,6 +38,7 @@ final class Message
|
||||
private readonly ?MessagePart $bodyStructure,
|
||||
private readonly array $bodySections,
|
||||
private readonly array $references = [],
|
||||
private readonly array $truncatedSections = [],
|
||||
) {}
|
||||
|
||||
public function sequence(): int
|
||||
@@ -166,6 +168,16 @@ final class Message
|
||||
return $this->bodySections;
|
||||
}
|
||||
|
||||
/**
|
||||
* Part ids of text sections that were cut off by a partial fetch.
|
||||
*
|
||||
* @return list<string>
|
||||
*/
|
||||
public function truncatedSections(): array
|
||||
{
|
||||
return $this->truncatedSections;
|
||||
}
|
||||
|
||||
public function bodyRaw(): ?string
|
||||
{
|
||||
return $this->bodySections[''] ?? null;
|
||||
@@ -196,6 +208,7 @@ final class Message
|
||||
$bodyStructure,
|
||||
$bodySections,
|
||||
$this->references,
|
||||
$this->truncatedSections,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user