1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace TelegramBot\Api\Types\Inline; |
4
|
|
|
|
5
|
|
|
use TelegramBot\Api\BaseType; |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* Class AbstractInlineQueryResult |
9
|
|
|
* Abstract class for representing one result of an inline query |
10
|
|
|
* |
11
|
|
|
* @package TelegramBot\Api\Types |
12
|
|
|
*/ |
13
|
|
|
class AbstractInlineQueryResult extends BaseType |
14
|
|
|
{ |
15
|
|
|
/** |
16
|
|
|
* Type of the result, must be one of: article, photo, gif, mpeg4_gif, video |
17
|
|
|
* |
18
|
|
|
* @var string |
19
|
|
|
*/ |
20
|
|
|
protected $type; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Unique identifier for this result, 1-64 bytes |
24
|
|
|
* |
25
|
|
|
* @var string |
26
|
|
|
*/ |
27
|
|
|
protected $id; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Title for the result |
31
|
|
|
* |
32
|
|
|
* @var string |
33
|
|
|
*/ |
34
|
|
|
protected $title; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Text of the message to be sent |
38
|
|
|
* Optional for photo, gif, mpeg4_gif, video |
39
|
|
|
* |
40
|
|
|
* @var string |
41
|
|
|
*/ |
42
|
|
|
protected $messageText; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* Optional. Send “Markdown”, if you want Telegram apps to show bold, italic and inline URLs in your bot's message. |
46
|
|
|
* |
47
|
|
|
* @var string |
48
|
|
|
*/ |
49
|
|
|
protected $parseMode; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* Optional. Disables link previews for links in the sent message |
53
|
|
|
* |
54
|
|
|
* @var bool |
55
|
|
|
*/ |
56
|
|
|
protected $disableWebPagePreview; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @return string |
60
|
|
|
*/ |
61
|
|
|
public function getType() |
62
|
|
|
{ |
63
|
|
|
return $this->type; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @param string $type |
68
|
|
|
*/ |
69
|
|
|
public function setType($type) |
70
|
|
|
{ |
71
|
|
|
$this->type = $type; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @return string |
76
|
|
|
*/ |
77
|
|
|
public function getId() |
78
|
|
|
{ |
79
|
|
|
return $this->id; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @param string $id |
84
|
|
|
*/ |
85
|
|
|
public function setId($id) |
86
|
|
|
{ |
87
|
|
|
$this->id = $id; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @return string |
92
|
|
|
*/ |
93
|
|
|
public function getTitle() |
94
|
|
|
{ |
95
|
|
|
return $this->title; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @param string $title |
100
|
|
|
*/ |
101
|
|
|
public function setTitle($title) |
102
|
|
|
{ |
103
|
|
|
$this->title = $title; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @return string |
108
|
|
|
*/ |
109
|
|
|
public function getMessageText() |
110
|
|
|
{ |
111
|
|
|
return $this->messageText; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @param string $messageText |
116
|
|
|
*/ |
117
|
|
|
public function setMessageText($messageText) |
118
|
|
|
{ |
119
|
|
|
$this->messageText = $messageText; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* @return string |
124
|
|
|
*/ |
125
|
|
|
public function getParseMode() |
126
|
|
|
{ |
127
|
|
|
return $this->parseMode; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* @param string $parseMode |
132
|
|
|
*/ |
133
|
|
|
public function setParseMode($parseMode) |
134
|
|
|
{ |
135
|
|
|
$this->parseMode = $parseMode; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @return boolean |
140
|
|
|
*/ |
141
|
|
|
public function isDisableWebPagePreview() |
142
|
|
|
{ |
143
|
|
|
return $this->disableWebPagePreview; |
144
|
|
|
} |
145
|
|
|
|
146
|
|
|
/** |
147
|
|
|
* @param boolean $disableWebPagePreview |
148
|
|
|
*/ |
149
|
|
|
public function setDisableWebPagePreview($disableWebPagePreview) |
150
|
|
|
{ |
151
|
|
|
$this->disableWebPagePreview = $disableWebPagePreview; |
152
|
|
|
} |
153
|
|
|
} |