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 + ]; + } + +}