summaryrefslogtreecommitdiff
path: root/matrix-specification/Data/ToDevice.php
blob: 362ce06ef84bf9d2323887b1d82603f4f3e8285e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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,
    ];
  }
}