feat: extract references

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-09-29 19:44:03 -04:00
parent 8abd2c2c8c
commit e5e76351a5
2 changed files with 31 additions and 1 deletions
+11
View File
@@ -15,6 +15,7 @@ final class Message
* @param list<MessageAddress> $cc
* @param list<MessageAddress> $bcc
* @param array<string, string> $bodySections
* @param list<string> $references message ids from the References header, without angle brackets
*/
public function __construct(
private readonly int $sequence,
@@ -35,6 +36,7 @@ final class Message
private readonly array $bcc,
private readonly ?MessagePart $bodyStructure,
private readonly array $bodySections,
private readonly array $references = [],
) {}
public function sequence(): int
@@ -90,6 +92,14 @@ final class Message
return $this->inReplyTo;
}
/**
* @return list<string>
*/
public function references(): array
{
return $this->references;
}
/**
* @return list<MessageAddress>
*/
@@ -185,6 +195,7 @@ final class Message
$this->bcc,
$bodyStructure,
$bodySections,
$this->references,
);
}
}