summaryrefslogtreecommitdiff
path: root/matrix-specification/Data/Room/ThumbnailInfo.php
blob: 31a264b47be4cd896a40e113d1ba999b18e9a925 (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
<?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,
    ];
  }
}