1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Teebot\Entity\Inline\Result; |
4
|
|
|
|
5
|
|
|
class InlineQueryResultVideo extends InlineQueryResultAbstract |
6
|
|
|
{ |
7
|
|
|
const ENTITY_TYPE = 'InlineQueryResultVideo'; |
8
|
|
|
|
9
|
|
|
const RESULT_TYPE = 'video'; |
10
|
|
|
|
11
|
|
|
const MIME_TYPE_HTML = 'text/html'; |
12
|
|
|
|
13
|
|
|
const MIME_TYPE_MP4 = 'video/mp4'; |
14
|
|
|
|
15
|
|
|
protected $video_url; |
16
|
|
|
|
17
|
|
|
protected $mime_type; |
18
|
|
|
|
19
|
|
|
protected $message_text; |
20
|
|
|
|
21
|
|
|
protected $video_width; |
22
|
|
|
|
23
|
|
|
protected $video_height; |
24
|
|
|
|
25
|
|
|
protected $video_duration; |
26
|
|
|
|
27
|
|
|
protected $description; |
28
|
|
|
|
29
|
|
|
protected $supportedProperties = [ |
30
|
|
|
'type' => true, |
31
|
|
|
'id' => true, |
32
|
|
|
'video_url' => true, |
33
|
|
|
'mime_type' => true, |
34
|
|
|
'message_text' => true, |
35
|
|
|
'title' => true, |
36
|
|
|
'parse_mode' => false, |
37
|
|
|
'disable_web_page_preview' => false, |
38
|
|
|
'video_width' => false, |
39
|
|
|
'video_height' => false, |
40
|
|
|
'video_duration' => false, |
41
|
|
|
'thumb_url' => true, |
42
|
|
|
'description' => false, |
43
|
|
|
'reply_markup' => false, |
44
|
|
|
'input_message_content' => true, |
45
|
|
|
]; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @return mixed |
49
|
|
|
*/ |
50
|
|
|
public function getVideoUrl() |
51
|
|
|
{ |
52
|
|
|
return $this->video_url; |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* @param mixed $video_url |
57
|
|
|
* |
58
|
|
|
* @return $this |
59
|
|
|
*/ |
60
|
|
|
public function setVideoUrl($video_url) |
61
|
|
|
{ |
62
|
|
|
$this->video_url = $video_url; |
63
|
|
|
|
64
|
|
|
return $this; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @return mixed |
69
|
|
|
*/ |
70
|
|
|
public function getMimeType() |
71
|
|
|
{ |
72
|
|
|
return $this->mime_type; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @param mixed $mime_type |
77
|
|
|
* |
78
|
|
|
* @return $this |
79
|
|
|
*/ |
80
|
|
|
public function setMimeType($mime_type) |
81
|
|
|
{ |
82
|
|
|
$this->mime_type = $mime_type; |
83
|
|
|
|
84
|
|
|
return $this; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* @return $this |
89
|
|
|
*/ |
90
|
|
|
public function setMimeTypeHTML() |
91
|
|
|
{ |
92
|
|
|
$this->mime_type = static::MIME_TYPE_HTML; |
93
|
|
|
|
94
|
|
|
return $this; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* @return $this |
99
|
|
|
*/ |
100
|
|
|
public function setMimeTypeMp4() |
101
|
|
|
{ |
102
|
|
|
$this->mime_type = static::MIME_TYPE_MP4; |
103
|
|
|
|
104
|
|
|
return $this; |
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* @return mixed |
109
|
|
|
*/ |
110
|
|
|
public function getMessageText() |
111
|
|
|
{ |
112
|
|
|
return $this->message_text; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* @param mixed $message_text |
117
|
|
|
* |
118
|
|
|
* @return $this |
119
|
|
|
*/ |
120
|
|
|
public function setMessageText($message_text) |
121
|
|
|
{ |
122
|
|
|
$this->message_text = $message_text; |
123
|
|
|
|
124
|
|
|
return $this; |
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
/** |
128
|
|
|
* @return mixed |
129
|
|
|
*/ |
130
|
|
|
public function getVideoWidth() |
131
|
|
|
{ |
132
|
|
|
return $this->video_width; |
133
|
|
|
} |
134
|
|
|
|
135
|
|
|
/** |
136
|
|
|
* @param mixed $video_width |
137
|
|
|
* |
138
|
|
|
* @return $this |
139
|
|
|
*/ |
140
|
|
|
public function setVideoWidth($video_width) |
141
|
|
|
{ |
142
|
|
|
$this->video_width = $video_width; |
143
|
|
|
|
144
|
|
|
return $this; |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* @return mixed |
149
|
|
|
*/ |
150
|
|
|
public function getVideoHeight() |
151
|
|
|
{ |
152
|
|
|
return $this->video_height; |
153
|
|
|
} |
154
|
|
|
|
155
|
|
|
/** |
156
|
|
|
* @param mixed $video_height |
157
|
|
|
* |
158
|
|
|
* @return $this |
159
|
|
|
*/ |
160
|
|
|
public function setVideoHeight($video_height) |
161
|
|
|
{ |
162
|
|
|
$this->video_height = $video_height; |
163
|
|
|
|
164
|
|
|
return $this; |
165
|
|
|
} |
166
|
|
|
|
167
|
|
|
/** |
168
|
|
|
* @return mixed |
169
|
|
|
*/ |
170
|
|
|
public function getVideoDuration() |
171
|
|
|
{ |
172
|
|
|
return $this->video_duration; |
173
|
|
|
} |
174
|
|
|
|
175
|
|
|
/** |
176
|
|
|
* @param mixed $video_duration |
177
|
|
|
* |
178
|
|
|
* @return $this |
179
|
|
|
*/ |
180
|
|
|
public function setVideoDuration($video_duration) |
181
|
|
|
{ |
182
|
|
|
$this->video_duration = $video_duration; |
183
|
|
|
|
184
|
|
|
return $this; |
185
|
|
|
} |
186
|
|
|
|
187
|
|
|
/** |
188
|
|
|
* @return mixed |
189
|
|
|
*/ |
190
|
|
|
public function getDescription() |
191
|
|
|
{ |
192
|
|
|
return $this->description; |
193
|
|
|
} |
194
|
|
|
|
195
|
|
|
/** |
196
|
|
|
* @param mixed $description |
197
|
|
|
* |
198
|
|
|
* @return $this |
199
|
|
|
*/ |
200
|
|
|
public function setDescription($description) |
201
|
|
|
{ |
202
|
|
|
$this->description = $description; |
203
|
|
|
|
204
|
|
|
return $this; |
205
|
|
|
} |
206
|
|
|
} |
207
|
|
|
|