1 | <?php |
||
14 | class Video extends AbstractInlineQueryResult |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | static protected $requiredParams = ['type', 'id', 'video_url', 'mime_type', 'thumb_url', 'title']; |
||
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | static protected $map = [ |
||
29 | 'type' => true, |
||
30 | 'id' => true, |
||
31 | 'video_url' => true, |
||
32 | 'mime_type' => true, |
||
33 | 'thumb_url' => true, |
||
34 | 'title' => true, |
||
35 | 'caption' => true, |
||
36 | 'description' => true, |
||
37 | 'video_width' => true, |
||
38 | 'video_height' => true, |
||
39 | 'video_duration' => true, |
||
40 | 'reply_markup' => InlineKeyboardMarkup::class, |
||
41 | 'input_message_content' => InputMessageContent::class, |
||
42 | ]; |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | * |
||
47 | * @var string |
||
48 | */ |
||
49 | protected $type = 'video'; |
||
50 | |||
51 | /** |
||
52 | * A valid URL for the embedded video player or video file |
||
53 | * |
||
54 | * @var string |
||
55 | */ |
||
56 | protected $videoUrl; |
||
57 | |||
58 | /** |
||
59 | * Mime type of the content of video url, “text/html” or “video/mp4” |
||
60 | * |
||
61 | * @var string |
||
62 | */ |
||
63 | protected $mimeType; |
||
64 | |||
65 | /** |
||
66 | * Optional. Video width |
||
67 | * |
||
68 | * @var int |
||
69 | */ |
||
70 | protected $videoWidth; |
||
71 | |||
72 | /** |
||
73 | * Optional. Video height |
||
74 | * |
||
75 | * @var int |
||
76 | */ |
||
77 | protected $videoHeight; |
||
78 | |||
79 | /** |
||
80 | * Optional. Video duration in seconds |
||
81 | * |
||
82 | * @var int |
||
83 | */ |
||
84 | protected $videoDuration; |
||
85 | |||
86 | /** |
||
87 | * URL of the thumbnail (jpeg only) for the video |
||
88 | * |
||
89 | * @var string |
||
90 | */ |
||
91 | protected $thumbUrl; |
||
92 | |||
93 | /** |
||
94 | * Optional. Short description of the result |
||
95 | * |
||
96 | * @var string |
||
97 | */ |
||
98 | protected $caption; |
||
99 | |||
100 | /** |
||
101 | * Optional. Short description of the result |
||
102 | * |
||
103 | * @var string |
||
104 | */ |
||
105 | protected $description; |
||
106 | |||
107 | |||
108 | /** |
||
109 | * Video constructor |
||
110 | * |
||
111 | * @param string $id |
||
112 | * @param string $videoUrl |
||
113 | * @param string $thumbUrl |
||
114 | * @param string $mimeType |
||
115 | * @param string $title |
||
116 | * @param string|null $caption |
||
117 | * @param string|null $description |
||
118 | * @param int|null $videoWidth |
||
119 | * @param int|null $videoHeight |
||
120 | * @param int|null $videoDuration |
||
121 | * @param InputMessageContent|null $inputMessageContent |
||
122 | * @param InlineKeyboardMarkup|null $inlineKeyboardMarkup |
||
123 | */ |
||
124 | public function __construct( |
||
149 | |||
150 | |||
151 | /** |
||
152 | * @return string |
||
153 | */ |
||
154 | public function getVideoUrl() |
||
158 | |||
159 | /** |
||
160 | * @param string $videoUrl |
||
161 | */ |
||
162 | public function setVideoUrl($videoUrl) |
||
166 | |||
167 | /** |
||
168 | * @return string |
||
169 | */ |
||
170 | public function getMimeType() |
||
174 | |||
175 | /** |
||
176 | * @param string $mimeType |
||
177 | */ |
||
178 | public function setMimeType($mimeType) |
||
182 | |||
183 | /** |
||
184 | * @return int |
||
185 | */ |
||
186 | public function getVideoWidth() |
||
190 | |||
191 | /** |
||
192 | * @param int $videoWidth |
||
193 | */ |
||
194 | public function setVideoWidth($videoWidth) |
||
198 | |||
199 | /** |
||
200 | * @return int |
||
201 | */ |
||
202 | public function getVideoHeight() |
||
206 | |||
207 | /** |
||
208 | * @param int $videoHeight |
||
209 | */ |
||
210 | public function setVideoHeight($videoHeight) |
||
214 | |||
215 | /** |
||
216 | * @return int |
||
217 | */ |
||
218 | public function getVideoDuration() |
||
222 | |||
223 | /** |
||
224 | * @param int $videoDuration |
||
225 | */ |
||
226 | public function setVideoDuration($videoDuration) |
||
230 | |||
231 | /** |
||
232 | * @return mixed |
||
233 | */ |
||
234 | public function getThumbUrl() |
||
238 | |||
239 | /** |
||
240 | * @param mixed $thumbUrl |
||
241 | */ |
||
242 | public function setThumbUrl($thumbUrl) |
||
246 | |||
247 | /** |
||
248 | * @return string |
||
249 | */ |
||
250 | public function getCaption() |
||
254 | |||
255 | /** |
||
256 | * @param string $caption |
||
257 | */ |
||
258 | public function setCaption($caption) |
||
262 | |||
263 | /** |
||
264 | * @return string |
||
265 | */ |
||
266 | public function getDescription() |
||
270 | |||
271 | /** |
||
272 | * @param string $description |
||
273 | */ |
||
274 | public function setDescription($description) |
||
278 | } |
||
279 |