refactor: use new mail interface desing

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-05-14 22:44:28 -04:00
parent b37da945f5
commit ca646eec3c
9 changed files with 311 additions and 200 deletions

View File

@@ -9,7 +9,6 @@ declare(strict_types=1);
namespace KTXM\ProviderImap\Providers;
use DateTimeInterface;
use KTXM\ProviderImap\Client\Message;
use KTXF\Mail\Entity\EntityMutableAbstract;
@@ -43,27 +42,6 @@ class EntityResource extends EntityMutableAbstract {
return $this;
}
/**
* Convert mail entity object to store array
*/
public function toStore(): array {
return array_merge(
$this->data,
['properties' => $this->getProperties()->toStore()]
);
}
/**
* Hydrate mail entity object from store array
*/
public function fromStore(array $data): static {
$properties = $data['properties'] ?? [];
unset($data['properties']);
$this->data = $data;
$this->getProperties()->fromStore($properties);
return $this;
}
/**
* @inheritDoc
*/