summaryrefslogtreecommitdiff
path: root/matrix-specification/Data/Ruleset.php
blob: af75579143a42b570b4e1742b2252ca2b7dadf92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

namespace Matrix\Data;

class Ruleset implements \JsonSerializable
{
  /**
   * @param PushRule[] $content
   * @param PushRule[] $override
   * @param PushRule[] $room
   * @param PushRule[] $sender
   * @param PushRule[] $underride
   */
  public function __construct(
    private array $content,
    private array $override,
    private array $room,
    private array $sender,
    private array $underride,
  )
  {}

  public function jsonSerialize(): array
  {
    return [
      "content" => $this->content,
      "override" => $this->override,
      "room" => $this->room,
      "sender" => $this->sender,
      "underride" => $this->underride,
    ];
  }
}