1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Zanzara\Telegram\Type\Input; |
6
|
|
|
/** |
7
|
|
|
* Represents the content of a text message to be sent as the result of an inline query. |
8
|
|
|
* |
9
|
|
|
* More on https://core.telegram.org/bots/api#inputtextmessagecontent |
10
|
|
|
*/ |
11
|
|
|
class InputTextMessageContent extends InputMessageContent |
12
|
|
|
{ |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* Text of the message to be sent, 1-4096 characters |
16
|
|
|
* |
17
|
|
|
* @var string |
18
|
|
|
*/ |
19
|
|
|
private $message_text; |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in |
23
|
|
|
* your bot's message. |
24
|
|
|
* |
25
|
|
|
* @var string|null |
26
|
|
|
*/ |
27
|
|
|
private $parse_mode; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode |
31
|
|
|
* |
32
|
|
|
* @since zanzara 0.5.0, Telegram Bot Api 5.0 |
33
|
|
|
* |
34
|
|
|
* @var \Zanzara\Telegram\Type\MessageEntity[]|null |
35
|
|
|
*/ |
36
|
|
|
private $caption_entities; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* Optional. Disables link previews for links in the sent message |
40
|
|
|
* |
41
|
|
|
* @var bool|null |
42
|
|
|
*/ |
43
|
|
|
private $disable_web_page_preview; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @return string |
47
|
|
|
*/ |
48
|
|
|
public function getMessageText(): string |
49
|
|
|
{ |
50
|
|
|
return $this->message_text; |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @param string $message_text |
55
|
|
|
*/ |
56
|
|
|
public function setMessageText(string $message_text): void |
57
|
|
|
{ |
58
|
|
|
$this->message_text = $message_text; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @return string|null |
63
|
|
|
*/ |
64
|
|
|
public function getParseMode(): ?string |
65
|
|
|
{ |
66
|
|
|
return $this->parse_mode; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* @param string|null $parse_mode |
71
|
|
|
*/ |
72
|
|
|
public function setParseMode(?string $parse_mode): void |
73
|
|
|
{ |
74
|
|
|
$this->parse_mode = $parse_mode; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @return bool|null |
79
|
|
|
*/ |
80
|
|
|
public function getDisableWebPagePreview(): ?bool |
81
|
|
|
{ |
82
|
|
|
return $this->disable_web_page_preview; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @param bool|null $disable_web_page_preview |
87
|
|
|
*/ |
88
|
|
|
public function setDisableWebPagePreview(?bool $disable_web_page_preview): void |
89
|
|
|
{ |
90
|
|
|
$this->disable_web_page_preview = $disable_web_page_preview; |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @return \Zanzara\Telegram\Type\MessageEntity[]|null |
95
|
|
|
*/ |
96
|
|
|
public function getCaptionEntities(): ?array |
97
|
|
|
{ |
98
|
|
|
return $this->caption_entities; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @param \Zanzara\Telegram\Type\MessageEntity[]|null $caption_entities |
103
|
|
|
*/ |
104
|
|
|
public function setCaptionEntities(?array $caption_entities): void |
105
|
|
|
{ |
106
|
|
|
$this->caption_entities = $caption_entities; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
} |