blob: 473beb9017571289cfe75119c91f4fdb365d1cc2 (
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
|
<?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,
];
}
}
|