diff options
Diffstat (limited to 'matrix-specification/Data/ToDevice.php')
| -rw-r--r-- | matrix-specification/Data/ToDevice.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/matrix-specification/Data/ToDevice.php b/matrix-specification/Data/ToDevice.php new file mode 100644 index 0000000..362ce06 --- /dev/null +++ b/matrix-specification/Data/ToDevice.php @@ -0,0 +1,23 @@ +<?php + +namespace Matrix\Data; + +use Matrix\Events\SenderEvent; + +class ToDevice implements \JsonSerializable +{ + /** + * @param SenderEvent[] $events + */ + public function __construct( + private array $events + ) + {} + + public function jsonSerialize(): array + { + return [ + "events" => $this->events, + ]; + } +} |
