Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IMAP/Threading/Container.php')
-rw-r--r--lib/IMAP/Threading/Container.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/IMAP/Threading/Container.php b/lib/IMAP/Threading/Container.php
index e57e390ac..9a25ad5fe 100644
--- a/lib/IMAP/Threading/Container.php
+++ b/lib/IMAP/Threading/Container.php
@@ -25,11 +25,12 @@ declare(strict_types=1);
namespace OCA\Mail\IMAP\Threading;
+use JsonSerializable;
use RuntimeException;
use function array_key_exists;
use function spl_object_id;
-class Container {
+class Container implements JsonSerializable {
/** @var Message|null */
private $message;
@@ -147,4 +148,13 @@ class Container {
public function getChildren(): array {
return $this->children;
}
+
+ public function jsonSerialize() {
+ return [
+ 'message' => $this->message,
+ 'id' => $this->id,
+ 'root' => $this->root,
+ 'children' => $this->children,
+ ];
+ }
}