Total Complexity | 6 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class GetArchivedStickerSets extends TdFunction |
||
15 | { |
||
16 | public const TYPE_NAME = 'getArchivedStickerSets'; |
||
17 | |||
18 | /** |
||
19 | * Pass true to return mask stickers sets; pass false to return ordinary sticker sets. |
||
20 | * |
||
21 | * @var bool |
||
22 | */ |
||
23 | protected bool $isMasks; |
||
24 | |||
25 | /** |
||
26 | * Identifier of the sticker set from which to return the result. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected string $offsetStickerSetId; |
||
31 | |||
32 | /** |
||
33 | * The maximum number of sticker sets to return. |
||
34 | * |
||
35 | * @var int |
||
36 | */ |
||
37 | protected int $limit; |
||
38 | |||
39 | public function __construct(bool $isMasks, string $offsetStickerSetId, int $limit) |
||
40 | { |
||
41 | $this->isMasks = $isMasks; |
||
42 | $this->offsetStickerSetId = $offsetStickerSetId; |
||
43 | $this->limit = $limit; |
||
44 | } |
||
45 | |||
46 | public static function fromArray(array $array): GetArchivedStickerSets |
||
47 | { |
||
48 | return new static( |
||
49 | $array['is_masks'], |
||
50 | $array['offset_sticker_set_id'], |
||
51 | $array['limit'], |
||
52 | ); |
||
53 | } |
||
54 | |||
55 | public function typeSerialize(): array |
||
56 | { |
||
57 | return [ |
||
58 | '@type' => static::TYPE_NAME, |
||
59 | 'is_masks' => $this->isMasks, |
||
60 | 'offset_sticker_set_id' => $this->offsetStickerSetId, |
||
61 | 'limit' => $this->limit, |
||
62 | ]; |
||
63 | } |
||
64 | |||
65 | public function getIsMasks(): bool |
||
66 | { |
||
67 | return $this->isMasks; |
||
68 | } |
||
69 | |||
70 | public function getOffsetStickerSetId(): string |
||
73 | } |
||
74 | |||
75 | public function getLimit(): int |
||
76 | { |
||
78 | } |
||
79 | } |
||
80 |