summaryrefslogtreecommitdiff
path: root/matrix-specification/Message.php
blob: 015348a45d64c82f491353cf57e92ea17c5ef2b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

namespace Matrix;

abstract class Message implements \JsonSerializable
{
  public function setDefaults(): void {}

  /**
   * @return array<string, string>
   */
  abstract public function getBody(): array;

  public function jsonSerialize(): array
  {
    return $this->getBody();
  }
}