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