1 | <?php |
||
15 | class Photo extends AbstractInlineQueryResult |
||
16 | { |
||
17 | /** |
||
18 | * {@inheritdoc} |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | static protected $requiredParams = ['type', 'id', 'photo_url', 'thumb_url']; |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | static protected $map = [ |
||
30 | 'type' => true, |
||
31 | 'id' => true, |
||
32 | 'photo_url' => true, |
||
33 | 'mime_type' => true, |
||
34 | 'photo_width' => true, |
||
35 | 'photo_height' => true, |
||
36 | 'thumb_url' => true, |
||
37 | 'title' => true, |
||
38 | 'description' => true, |
||
39 | 'caption' => true, |
||
40 | 'message_text' => true, |
||
41 | 'parse_mode' => true, |
||
42 | 'disable_web_page_preview' => true, |
||
43 | ]; |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | * |
||
48 | * @var string |
||
49 | */ |
||
50 | protected $type = 'photo'; |
||
51 | |||
52 | /** |
||
53 | * A valid URL of the photo. Photo size must not exceed 5MB |
||
54 | * |
||
55 | * @var string |
||
56 | */ |
||
57 | protected $photoUrl; |
||
58 | |||
59 | /** |
||
60 | * Optional. Width of the photo |
||
61 | * |
||
62 | * @var int |
||
63 | */ |
||
64 | protected $photoWidth; |
||
65 | |||
66 | /** |
||
67 | * Optional. Height of the photo |
||
68 | * |
||
69 | * @var int |
||
70 | */ |
||
71 | protected $photoHeight; |
||
72 | |||
73 | /** |
||
74 | * URL of the thumbnail for the photo |
||
75 | * |
||
76 | * @var |
||
77 | */ |
||
78 | protected $thumbUrl; |
||
79 | |||
80 | /** |
||
81 | * Optional. Short description of the result |
||
82 | * |
||
83 | * @var string |
||
84 | */ |
||
85 | protected $description; |
||
86 | |||
87 | /** |
||
88 | * Optional. Caption of the photo to be sent, 0-200 characters |
||
89 | * |
||
90 | * @var string |
||
91 | */ |
||
92 | protected $caption; |
||
93 | |||
94 | /** |
||
95 | * InlineQueryResultPhoto constructor. |
||
96 | * |
||
97 | * @param string $id |
||
98 | * @param string $photoUrl |
||
99 | * @param string $thumbUrl |
||
100 | * @param int|null $photoWidth |
||
101 | * @param int|null $photoHeight |
||
102 | * @param string|null $title |
||
103 | * @param string|null $description |
||
104 | * @param string|null $caption |
||
105 | * @param InputMessageContent|null $inputMessageContent |
||
106 | * @param InlineKeyboardMarkup|null $inlineKeyboardMarkup |
||
107 | */ |
||
108 | public function __construct( |
||
129 | |||
130 | |||
131 | /** |
||
132 | * @return string |
||
133 | */ |
||
134 | public function getPhotoUrl() |
||
138 | |||
139 | /** |
||
140 | * @param string $photoUrl |
||
141 | */ |
||
142 | public function setPhotoUrl($photoUrl) |
||
146 | |||
147 | /** |
||
148 | * @return int |
||
149 | */ |
||
150 | public function getPhotoWidth() |
||
154 | |||
155 | /** |
||
156 | * @param int $photoWidth |
||
157 | */ |
||
158 | public function setPhotoWidth($photoWidth) |
||
162 | |||
163 | /** |
||
164 | * @return int |
||
165 | */ |
||
166 | public function getPhotoHeight() |
||
170 | |||
171 | /** |
||
172 | * @param int $photoHeight |
||
173 | */ |
||
174 | public function setPhotoHeight($photoHeight) |
||
178 | |||
179 | /** |
||
180 | * @return mixed |
||
181 | */ |
||
182 | public function getThumbUrl() |
||
186 | |||
187 | /** |
||
188 | * @param mixed $thumbUrl |
||
189 | */ |
||
190 | public function setThumbUrl($thumbUrl) |
||
194 | |||
195 | /** |
||
196 | * @return string |
||
197 | */ |
||
198 | public function getDescription() |
||
202 | |||
203 | /** |
||
204 | * @param string $description |
||
205 | */ |
||
206 | public function setDescription($description) |
||
210 | |||
211 | /** |
||
212 | * @return string |
||
213 | */ |
||
214 | public function getCaption() |
||
218 | |||
219 | /** |
||
220 | * @param string $caption |
||
221 | */ |
||
222 | public function setCaption($caption) |
||
226 | } |
||
227 |