diff options
Diffstat (limited to 'matrix-specification/Data/Ruleset.php')
| -rw-r--r-- | matrix-specification/Data/Ruleset.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/matrix-specification/Data/Ruleset.php b/matrix-specification/Data/Ruleset.php new file mode 100644 index 0000000..af75579 --- /dev/null +++ b/matrix-specification/Data/Ruleset.php @@ -0,0 +1,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, + ]; + } +} |
