1 | <?php |
||
14 | class Article extends AbstractInlineQueryResult |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | static protected $requiredParams = ['type', 'id', 'title', 'input_message_content']; |
||
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | static protected $map = [ |
||
29 | 'type' => true, |
||
30 | 'id' => true, |
||
31 | 'title' => true, |
||
32 | 'input_message_content' => InputMessageContent::class, |
||
33 | 'reply_markup' => InlineKeyboardMarkup::class, |
||
34 | 'disable_web_page_preview' => true, |
||
35 | 'url' => true, |
||
36 | 'hide_url' => true, |
||
37 | 'description' => true, |
||
38 | 'thumb_url' => true, |
||
39 | 'thumb_width' => true, |
||
40 | 'thumb_height' => true, |
||
41 | ]; |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | * |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $type = 'article'; |
||
49 | |||
50 | /** |
||
51 | * Optional. URL of the result |
||
52 | * |
||
53 | * @var string |
||
54 | */ |
||
55 | protected $url; |
||
56 | |||
57 | /** |
||
58 | * Optional. Pass True, if you don't want the URL to be shown in the message |
||
59 | * |
||
60 | * @var bool |
||
61 | */ |
||
62 | protected $hideUrl; |
||
63 | |||
64 | /** |
||
65 | * Optional. Short description of the result |
||
66 | * |
||
67 | * @var string |
||
68 | */ |
||
69 | protected $description; |
||
70 | |||
71 | /** |
||
72 | * Optional. Url of the thumbnail for the result |
||
73 | * |
||
74 | * @var string |
||
75 | */ |
||
76 | protected $thumbUrl; |
||
77 | |||
78 | /** |
||
79 | * Optional. Thumbnail width |
||
80 | * |
||
81 | * @var int |
||
82 | */ |
||
83 | protected $thumbWidth; |
||
84 | |||
85 | /** |
||
86 | * Optional. Thumbnail height |
||
87 | * |
||
88 | * @var int |
||
89 | */ |
||
90 | protected $thumbHeight; |
||
91 | |||
92 | /** |
||
93 | * InlineQueryResultArticle constructor. |
||
94 | * |
||
95 | * @param string $id |
||
96 | * @param string $title |
||
97 | * @param InputMessageContent $inputMessageContent |
||
98 | * @param InlineKeyboardMarkup|null $inlineKeyboardMarkup |
||
99 | * @param string|null $url |
||
100 | * @param bool $hideUrl |
||
101 | * @param string|null $description |
||
102 | * @param string|null $thumbUrl |
||
103 | * @param int|null $thumbWidth |
||
104 | * @param int|null $thumbHeight |
||
105 | */ |
||
106 | public function __construct( |
||
127 | |||
128 | |||
129 | /** |
||
130 | * @return string |
||
131 | */ |
||
132 | public function getUrl() |
||
136 | |||
137 | /** |
||
138 | * @param string $url |
||
139 | */ |
||
140 | public function setUrl($url) |
||
144 | |||
145 | /** |
||
146 | * @return boolean |
||
147 | */ |
||
148 | public function isHideUrl() |
||
152 | |||
153 | /** |
||
154 | * @param boolean $hideUrl |
||
155 | */ |
||
156 | public function setHideUrl($hideUrl) |
||
160 | |||
161 | /** |
||
162 | * @return string |
||
163 | */ |
||
164 | public function getDescription() |
||
168 | |||
169 | /** |
||
170 | * @param string $description |
||
171 | */ |
||
172 | public function setDescription($description) |
||
176 | |||
177 | /** |
||
178 | * @return string |
||
179 | */ |
||
180 | public function getThumbUrl() |
||
184 | |||
185 | /** |
||
186 | * @param string $thumbUrl |
||
187 | */ |
||
188 | public function setThumbUrl($thumbUrl) |
||
192 | |||
193 | /** |
||
194 | * @return int |
||
195 | */ |
||
196 | public function getThumbWidth() |
||
200 | |||
201 | /** |
||
202 | * @param int $thumbWidth |
||
203 | */ |
||
204 | public function setThumbWidth($thumbWidth) |
||
208 | |||
209 | /** |
||
210 | * @return int |
||
211 | */ |
||
212 | public function getThumbHeight() |
||
216 | |||
217 | /** |
||
218 | * @param int $thumbHeight |
||
219 | */ |
||
220 | public function setThumbHeight($thumbHeight) |
||
224 | } |
||
225 |