Completed
Push — master ( 92aedf...f48b94 )
by Gusev
03:07
created

InlineQueryResultArticle::setHideUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace TelegramBot\Api\Types\Inline;
4
5
/**
6
 * Class InlineQueryResultArticle
7
 * Represents a link to an article or web page.
8
 *
9
 * @package TelegramBot\Api\Types\Inline
10
 */
11
class InlineQueryResultArticle extends AbstractInlineQueryResult
12
{
13
    /**
14
     * {@inheritdoc}
15
     *
16
     * @var array
17
     */
18
    static protected $requiredParams = ['type', 'id', 'title', 'message_text'];
19
20
    /**
21
     * {@inheritdoc}
22
     *
23
     * @var array
24
     */
25
    static protected $map = [
26
        'type' => true,
27
        'id' => true,
28
        'title' => true,
29
        'message_text' => true,
30
        'parse_mode' => true,
31
        'disable_web_page_preview' => true,
32
        'url' => true,
33
        'hide_url' => true,
34
        'description' => true,
35
        'thumb_url' => true,
36
        'thumb_width' => true,
37
        'thumb_height' => true
38
    ];
39
40
    /**
41
     * Text of the message to be sent
42
     *
43
     * @var string
44
     */
45
    protected $messageText;
46
47
    /**
48
     * Optional. Send “Markdown”, if you want Telegram apps to show bold, italic and inline URLs in your bot's message.
49
     *
50
     * @var string
51
     */
52
    protected $parseMode;
53
54
    /**
55
     * Optional. Disables link previews for links in the sent message
56
     *
57
     * @var bool
58
     */
59
    protected $disableWebPagePreview;
60
61
    /**
62
     * Optional. URL of the result
63
     *
64
     * @var string
65
     */
66
    protected $url;
67
68
    /**
69
     * Optional. Pass True, if you don't want the URL to be shown in the message
70
     *
71
     * @var bool
72
     */
73
    protected $hideUrl;
74
75
    /**
76
     * Optional. Short description of the result
77
     *
78
     * @var string
79
     */
80
    protected $description;
81
82
    /**
83
     * Optional. Url of the thumbnail for the result
84
     *
85
     * @var string
86
     */
87
    protected $thumbUrl;
88
89
    /**
90
     * Optional. Thumbnail width
91
     *
92
     * @var int
93
     */
94
    protected $thumbWidth;
95
96
    /**
97
     * Optional. Thumbnail height
98
     *
99
     * @var int
100
     */
101
    protected $thumbHeight;
102
103
    /**
104
     * @return array
105
     */
106
    public static function getRequiredParams()
107
    {
108
        return self::$requiredParams;
109
    }
110
111
    /**
112
     * @param array $requiredParams
113
     */
114
    public static function setRequiredParams($requiredParams)
115
    {
116
        self::$requiredParams = $requiredParams;
117
    }
118
119
    /**
120
     * @return array
121
     */
122
    public static function getMap()
123
    {
124
        return self::$map;
125
    }
126
127
    /**
128
     * @param array $map
129
     */
130
    public static function setMap($map)
131
    {
132
        self::$map = $map;
133
    }
134
135
    /**
136
     * @return string
137
     */
138
    public function getMessageText()
139
    {
140
        return $this->messageText;
141
    }
142
143
    /**
144
     * @param string $messageText
145
     */
146
    public function setMessageText($messageText)
147
    {
148
        $this->messageText = $messageText;
149
    }
150
151
    /**
152
     * @return string
153
     */
154
    public function getParseMode()
155
    {
156
        return $this->parseMode;
157
    }
158
159
    /**
160
     * @param string $parseMode
161
     */
162
    public function setParseMode($parseMode)
163
    {
164
        $this->parseMode = $parseMode;
165
    }
166
167
    /**
168
     * @return boolean
169
     */
170
    public function isDisableWebPagePreview()
171
    {
172
        return $this->disableWebPagePreview;
173
    }
174
175
    /**
176
     * @param boolean $disableWebPagePreview
177
     */
178
    public function setDisableWebPagePreview($disableWebPagePreview)
179
    {
180
        $this->disableWebPagePreview = $disableWebPagePreview;
181
    }
182
183
    /**
184
     * @return string
185
     */
186
    public function getUrl()
187
    {
188
        return $this->url;
189
    }
190
191
    /**
192
     * @param string $url
193
     */
194
    public function setUrl($url)
195
    {
196
        $this->url = $url;
197
    }
198
199
    /**
200
     * @return boolean
201
     */
202
    public function isHideUrl()
203
    {
204
        return $this->hideUrl;
205
    }
206
207
    /**
208
     * @param boolean $hideUrl
209
     */
210
    public function setHideUrl($hideUrl)
211
    {
212
        $this->hideUrl = $hideUrl;
213
    }
214
215
    /**
216
     * @return string
217
     */
218
    public function getDescription()
219
    {
220
        return $this->description;
221
    }
222
223
    /**
224
     * @param string $description
225
     */
226
    public function setDescription($description)
227
    {
228
        $this->description = $description;
229
    }
230
231
    /**
232
     * @return string
233
     */
234
    public function getThumbUrl()
235
    {
236
        return $this->thumbUrl;
237
    }
238
239
    /**
240
     * @param string $thumbUrl
241
     */
242
    public function setThumbUrl($thumbUrl)
243
    {
244
        $this->thumbUrl = $thumbUrl;
245
    }
246
247
    /**
248
     * @return int
249
     */
250
    public function getThumbWidth()
251
    {
252
        return $this->thumbWidth;
253
    }
254
255
    /**
256
     * @param int $thumbWidth
257
     */
258
    public function setThumbWidth($thumbWidth)
259
    {
260
        $this->thumbWidth = $thumbWidth;
261
    }
262
263
    /**
264
     * @return int
265
     */
266
    public function getThumbHeight()
267
    {
268
        return $this->thumbHeight;
269
    }
270
271
    /**
272
     * @param int $thumbHeight
273
     */
274
    public function setThumbHeight($thumbHeight)
275
    {
276
        $this->thumbHeight = $thumbHeight;
277
    }
278
}
279