From ceefabb8e45f55c089311df1bcdd016e544384df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 11 Oct 2022 18:20:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kiri-actor/ActorMessage.php | 74 +++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 kiri-actor/ActorMessage.php diff --git a/kiri-actor/ActorMessage.php b/kiri-actor/ActorMessage.php new file mode 100644 index 00000000..700570ed --- /dev/null +++ b/kiri-actor/ActorMessage.php @@ -0,0 +1,74 @@ +userId = $userId; + $this->event = $event; + $this->body = $body; + } + + /** + * @return int + */ + public function getUserId(): int + { + return $this->userId; + } + + /** + * @return string + */ + public function getEvent(): string + { + return $this->event; + } + + /** + * @return array + */ + public function getBody(): array + { + return $this->body; + } + + + /** + * @return array + */ + public function jsonSerialize(): array + { + return [ + 'userId' => $this->userId, + 'event' => $this->event, + 'body' => $this->body + ]; + } + +}