blob: 034263e40ef3f2ffdf1cbd18d636589d44b30110 (
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
29
30
31
|
<?php
namespace Matrix\Data;
class DeviceKeys implements \JsonSerializable
{
/**
* @param string[] $algorithms
* @param array<string, string> $keys
* @param array<string, array<string, string>> $signatures
*/
public function __construct(
private array $algorithms,
private string $deviceId,
private array $keys,
private array $signatures,
private string $userId,
)
{}
public function jsonSerialize(): array
{
return [
"algorithms" => $this->algorithms,
"device_id" => $this->deviceId,
"keys" => $this->keys,
"signatures" => $this->signatures,
"user_id" => $this->userId,
];
}
}
|