1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Class that represents Telegram's Bot-API "editMessageText" method. |
5
|
|
|
* |
6
|
|
|
* @package Teebot (Telegram bot framework) |
7
|
|
|
* |
8
|
|
|
* @author Stanislav Drozdov <[email protected]> |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace Teebot\Method\Update; |
12
|
|
|
|
13
|
|
|
use Teebot\Entity\Message; |
14
|
|
|
|
15
|
|
|
class EditMessageText extends AbstractMethod |
16
|
|
|
{ |
17
|
|
|
const NAME = 'editMessageText'; |
18
|
|
|
|
19
|
|
|
const RETURN_ENTITY = Message::class; |
20
|
|
|
|
21
|
|
|
protected $chat_id; |
22
|
|
|
|
23
|
|
|
protected $message_id; |
24
|
|
|
|
25
|
|
|
protected $inline_message_id; |
26
|
|
|
|
27
|
|
|
protected $text; |
28
|
|
|
|
29
|
|
|
protected $parseMode; |
30
|
|
|
|
31
|
|
|
protected $disable_web_page_preview; |
32
|
|
|
|
33
|
|
|
protected $supportedProperties = [ |
34
|
|
|
'chat_id' => false, |
35
|
|
|
'message_id' => false, |
36
|
|
|
'inline_message_id' => false, |
37
|
|
|
'text' => true, |
38
|
|
|
'parse_mode' => false, |
39
|
|
|
'disable_web_page_preview' => false, |
40
|
|
|
'reply_markup' => false |
41
|
|
|
]; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @return mixed |
45
|
|
|
*/ |
46
|
|
|
public function getChatId() |
47
|
|
|
{ |
48
|
|
|
return $this->chat_id; |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @param mixed $chat_id |
53
|
|
|
* |
54
|
|
|
* @return $this |
55
|
|
|
*/ |
56
|
|
|
public function setChatId($chat_id) |
57
|
|
|
{ |
58
|
|
|
$this->chat_id = $chat_id; |
59
|
|
|
|
60
|
|
|
return $this; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @return mixed |
65
|
|
|
*/ |
66
|
|
|
public function getMessageId() |
67
|
|
|
{ |
68
|
|
|
return $this->message_id; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @param mixed $message_id |
73
|
|
|
* |
74
|
|
|
* @return $this |
75
|
|
|
*/ |
76
|
|
|
public function setMessageId($message_id) |
77
|
|
|
{ |
78
|
|
|
$this->message_id = $message_id; |
79
|
|
|
|
80
|
|
|
return $this; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @return mixed |
85
|
|
|
*/ |
86
|
|
|
public function getInlineMessageId() |
87
|
|
|
{ |
88
|
|
|
return $this->inline_message_id; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @param mixed $inline_message_id |
93
|
|
|
* |
94
|
|
|
* @return $this |
95
|
|
|
*/ |
96
|
|
|
public function setInlineMessageId($inline_message_id) |
97
|
|
|
{ |
98
|
|
|
$this->inline_message_id = $inline_message_id; |
99
|
|
|
|
100
|
|
|
return $this; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @return mixed |
105
|
|
|
*/ |
106
|
|
|
public function getText() |
107
|
|
|
{ |
108
|
|
|
return $this->text; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* @param mixed $text |
113
|
|
|
* |
114
|
|
|
* @return $this |
115
|
|
|
*/ |
116
|
|
|
public function setText($text) |
117
|
|
|
{ |
118
|
|
|
$this->text = $text; |
119
|
|
|
|
120
|
|
|
return $this; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* @return mixed |
125
|
|
|
*/ |
126
|
|
|
public function getParseMode() |
127
|
|
|
{ |
128
|
|
|
return $this->parseMode; |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* @param mixed $parseMode |
133
|
|
|
* |
134
|
|
|
* @return $this |
135
|
|
|
*/ |
136
|
|
|
public function setParseMode($parseMode) |
137
|
|
|
{ |
138
|
|
|
$this->parseMode = $parseMode; |
139
|
|
|
|
140
|
|
|
return $this; |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* @return mixed |
145
|
|
|
*/ |
146
|
|
|
public function getDisableWebPagePreview() |
147
|
|
|
{ |
148
|
|
|
return $this->disable_web_page_preview; |
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* @param mixed $disable_web_page_preview |
153
|
|
|
* |
154
|
|
|
* @return $this |
155
|
|
|
*/ |
156
|
|
|
public function setDisableWebPagePreview($disable_web_page_preview) |
157
|
|
|
{ |
158
|
|
|
$this->disable_web_page_preview = $disable_web_page_preview; |
159
|
|
|
|
160
|
|
|
return $this; |
161
|
|
|
} |
162
|
|
|
} |