generated from Nodarx/template
feat: speed improvements
Signed-off-by: Sebastian Krupinski <root@LAPTOP-7DVOR6NC>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user