feat: speed improvements

Signed-off-by: Sebastian Krupinski <root@LAPTOP-7DVOR6NC>
This commit is contained in:
Sebastian Krupinski
2026-02-20 23:34:30 -05:00
parent e51c65bf19
commit 7446edced3
37 changed files with 648 additions and 1086 deletions

View File

@@ -31,9 +31,8 @@ class EntityResource extends EntityMutableAbstract {
*
* @param FetchData $fetchData result from IMAP FETCH command
* @param string $mailbox IMAP mailbox name (used as collection)
* @param Part|null $bodyPart MIME Part tree for body content (optional)
*/
public function fromImap(FetchData $fetchData, string $mailbox, ?Part $bodyPart = null): static {
public function fromImap(FetchData $fetchData, string $mailbox): static {
// Collection = the IMAP mailbox name
$this->data['collection'] = $mailbox;
@@ -46,13 +45,7 @@ class EntityResource extends EntityMutableAbstract {
$this->data['created'] = $fetchData->internalDate->format(DateTimeInterface::ATOM);
}
$this->getProperties()->fromImap(
flags: $fetchData->flags ?? [],
envelope: $fetchData->envelope,
bodyStructure: $fetchData->bodyStructure,
size: $fetchData->rfc822Size ?? 0,
bodyPart: $bodyPart,
);
$this->getProperties()->fromImap($fetchData);
return $this;
}