diff options
Diffstat (limited to 'matrix-specification/Data/Room/AvatarInfo.php')
| -rw-r--r-- | matrix-specification/Data/Room/AvatarInfo.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/matrix-specification/Data/Room/AvatarInfo.php b/matrix-specification/Data/Room/AvatarInfo.php new file mode 100644 index 0000000..473beb9 --- /dev/null +++ b/matrix-specification/Data/Room/AvatarInfo.php @@ -0,0 +1,28 @@ +<?php + +namespace Matrix\Data\Room; + +class AvatarInfo implements \JsonSerializable +{ + public function __construct( + private int $height, + private string $mimeType, + private int $fileSize, + private ThumbnailInfo $thumbnailInfo, + private string $thumbnailUrl, + private int $width, + ) + {} + + public function jsonSerialize(): array + { + return [ + "h" => $this->height, + "mimetype" => $this->mimeType, + "size" => $this->fileSize, + "thumbnail_info" => $this->thumbnailInfo, + "thumbnail_url" => $this->thumbnailUrl, + "w" => $this->width, + ]; + } +} |
