|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Zanzara\Telegram\Type\File; |
|
6
|
|
|
|
|
7
|
|
|
/** |
|
8
|
|
|
* This object represents a sticker set. |
|
9
|
|
|
* |
|
10
|
|
|
* More on https://core.telegram.org/bots/api#stickerset |
|
11
|
|
|
*/ |
|
12
|
|
|
class StickerSet |
|
13
|
|
|
{ |
|
14
|
|
|
|
|
15
|
|
|
/** |
|
16
|
|
|
* Sticker set name |
|
17
|
|
|
* |
|
18
|
|
|
* @var string |
|
19
|
|
|
*/ |
|
20
|
|
|
private $name; |
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* Sticker set title |
|
24
|
|
|
* |
|
25
|
|
|
* @var string |
|
26
|
|
|
*/ |
|
27
|
|
|
private $title; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* True, if the sticker set contains animated stickers |
|
31
|
|
|
* |
|
32
|
|
|
* @var bool |
|
33
|
|
|
*/ |
|
34
|
|
|
private $is_animated; |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* True, if the sticker set contains masks |
|
38
|
|
|
* |
|
39
|
|
|
* @var bool |
|
40
|
|
|
*/ |
|
41
|
|
|
private $contains_masks; |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* List of all set stickers |
|
45
|
|
|
* |
|
46
|
|
|
* @var Sticker[] |
|
47
|
|
|
*/ |
|
48
|
|
|
private $stickers; |
|
49
|
|
|
|
|
50
|
|
|
/** |
|
51
|
|
|
* Optional. Sticker set thumbnail in the .WEBP or .TGS format |
|
52
|
|
|
* |
|
53
|
|
|
* @var PhotoSize|null |
|
54
|
|
|
*/ |
|
55
|
|
|
private $thumb; |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* @return string |
|
59
|
|
|
*/ |
|
60
|
|
|
public function getName(): string |
|
61
|
|
|
{ |
|
62
|
|
|
return $this->name; |
|
63
|
|
|
} |
|
64
|
|
|
|
|
65
|
|
|
/** |
|
66
|
|
|
* @param string $name |
|
67
|
|
|
*/ |
|
68
|
|
|
public function setName(string $name): void |
|
69
|
|
|
{ |
|
70
|
|
|
$this->name = $name; |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* @return string |
|
75
|
|
|
*/ |
|
76
|
|
|
public function getTitle(): string |
|
77
|
|
|
{ |
|
78
|
|
|
return $this->title; |
|
79
|
|
|
} |
|
80
|
|
|
|
|
81
|
|
|
/** |
|
82
|
|
|
* @param string $title |
|
83
|
|
|
*/ |
|
84
|
|
|
public function setTitle(string $title): void |
|
85
|
|
|
{ |
|
86
|
|
|
$this->title = $title; |
|
87
|
|
|
} |
|
88
|
|
|
|
|
89
|
|
|
/** |
|
90
|
|
|
* @return bool |
|
91
|
|
|
*/ |
|
92
|
|
|
public function isIsAnimated(): bool |
|
93
|
|
|
{ |
|
94
|
|
|
return $this->is_animated; |
|
95
|
|
|
} |
|
96
|
|
|
|
|
97
|
|
|
/** |
|
98
|
|
|
* @param bool $is_animated |
|
99
|
|
|
*/ |
|
100
|
|
|
public function setIsAnimated(bool $is_animated): void |
|
101
|
|
|
{ |
|
102
|
|
|
$this->is_animated = $is_animated; |
|
103
|
|
|
} |
|
104
|
|
|
|
|
105
|
|
|
/** |
|
106
|
|
|
* @return bool |
|
107
|
|
|
*/ |
|
108
|
|
|
public function isContainsMasks(): bool |
|
109
|
|
|
{ |
|
110
|
|
|
return $this->contains_masks; |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
/** |
|
114
|
|
|
* @param bool $contains_masks |
|
115
|
|
|
*/ |
|
116
|
|
|
public function setContainsMasks(bool $contains_masks): void |
|
117
|
|
|
{ |
|
118
|
|
|
$this->contains_masks = $contains_masks; |
|
119
|
|
|
} |
|
120
|
|
|
|
|
121
|
|
|
/** |
|
122
|
|
|
* @return Sticker[] |
|
123
|
|
|
*/ |
|
124
|
|
|
public function getStickers(): array |
|
125
|
|
|
{ |
|
126
|
|
|
return $this->stickers; |
|
127
|
|
|
} |
|
128
|
|
|
|
|
129
|
|
|
/** |
|
130
|
|
|
* @param Sticker[] $stickers |
|
131
|
|
|
*/ |
|
132
|
|
|
public function setStickers(array $stickers): void |
|
133
|
|
|
{ |
|
134
|
|
|
$this->stickers = $stickers; |
|
135
|
|
|
} |
|
136
|
|
|
|
|
137
|
|
|
/** |
|
138
|
|
|
* @return PhotoSize|null |
|
139
|
|
|
*/ |
|
140
|
|
|
public function getThumb(): ?PhotoSize |
|
141
|
|
|
{ |
|
142
|
|
|
return $this->thumb; |
|
143
|
|
|
} |
|
144
|
|
|
|
|
145
|
|
|
/** |
|
146
|
|
|
* @param PhotoSize|null $thumb |
|
147
|
|
|
*/ |
|
148
|
|
|
public function setThumb(?PhotoSize $thumb): void |
|
149
|
|
|
{ |
|
150
|
|
|
$this->thumb = $thumb; |
|
151
|
|
|
} |
|
152
|
|
|
|
|
153
|
|
|
} |