|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Teebot\Entity\Inline\Result; |
|
4
|
|
|
|
|
5
|
|
|
use Teebot\Entity\AbstractEntity; |
|
6
|
|
|
use Teebot\Entity\Inline\Input\InputMessageContentAbstract; |
|
7
|
|
|
|
|
8
|
|
|
abstract class InlineQueryResultAbstract extends AbstractEntity |
|
9
|
|
|
{ |
|
10
|
|
|
const RESULT_TYPE = 'InlineQueryResultAbstract'; |
|
11
|
|
|
|
|
12
|
|
|
protected $id; |
|
13
|
|
|
|
|
14
|
|
|
protected $title; |
|
15
|
|
|
|
|
16
|
|
|
protected $reply_markup; |
|
17
|
|
|
|
|
18
|
|
|
protected $input_message_content; |
|
19
|
|
|
|
|
20
|
|
|
protected $thumb_url; |
|
21
|
|
|
|
|
22
|
|
|
protected $builtInEntities = [ |
|
23
|
|
|
'reply_markup' => InlineKeyboardMarkup::class, |
|
24
|
|
|
'input_message_content' => InputMessageContentAbstract::class |
|
25
|
|
|
]; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* @return string |
|
29
|
|
|
*/ |
|
30
|
|
|
public function getType() |
|
31
|
|
|
{ |
|
32
|
|
|
return static::RESULT_TYPE; |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* @return string |
|
37
|
|
|
*/ |
|
38
|
|
|
public function getId() |
|
39
|
|
|
{ |
|
40
|
|
|
return (string) $this->id; |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @param mixed $id |
|
45
|
|
|
* |
|
46
|
|
|
* @return mixed |
|
47
|
|
|
*/ |
|
48
|
|
|
public function setId($id) |
|
49
|
|
|
{ |
|
50
|
|
|
$this->id = $id; |
|
51
|
|
|
|
|
52
|
|
|
return $this; |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* @return mixed |
|
57
|
|
|
*/ |
|
58
|
|
|
public function getTitle() |
|
59
|
|
|
{ |
|
60
|
|
|
return $this->title; |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* @param string $title |
|
65
|
|
|
* |
|
66
|
|
|
* @return $this |
|
67
|
|
|
*/ |
|
68
|
|
|
public function setTitle($title) |
|
69
|
|
|
{ |
|
70
|
|
|
$this->title = $title; |
|
71
|
|
|
|
|
72
|
|
|
return $this; |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
/** |
|
76
|
|
|
* @return mixed |
|
77
|
|
|
*/ |
|
78
|
|
|
public function getInputMessageContent() |
|
79
|
|
|
{ |
|
80
|
|
|
return $this->input_message_content; |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
/** |
|
84
|
|
|
* @param mixed $input_message_content |
|
85
|
|
|
* |
|
86
|
|
|
* @return $this |
|
87
|
|
|
*/ |
|
88
|
|
|
public function setInputMessageContent(InputMessageContentAbstract $input_message_content) |
|
89
|
|
|
{ |
|
90
|
|
|
$this->input_message_content = $input_message_content; |
|
91
|
|
|
|
|
92
|
|
|
return $this; |
|
93
|
|
|
} |
|
94
|
|
|
|
|
95
|
|
|
/** |
|
96
|
|
|
* @return mixed |
|
97
|
|
|
*/ |
|
98
|
|
|
public function getReplyMarkup() |
|
99
|
|
|
{ |
|
100
|
|
|
return $this->reply_markup; |
|
101
|
|
|
} |
|
102
|
|
|
|
|
103
|
|
|
/** |
|
104
|
|
|
* @param mixed $reply_markup |
|
105
|
|
|
* |
|
106
|
|
|
* @return $this |
|
107
|
|
|
*/ |
|
108
|
|
|
public function setReplyMarkup($reply_markup) |
|
109
|
|
|
{ |
|
110
|
|
|
$this->reply_markup = $reply_markup; |
|
111
|
|
|
|
|
112
|
|
|
return $this; |
|
113
|
|
|
} |
|
114
|
|
|
|
|
115
|
|
|
/** |
|
116
|
|
|
* @return string |
|
117
|
|
|
*/ |
|
118
|
|
|
public function getThumbUrl() |
|
119
|
|
|
{ |
|
120
|
|
|
return (string) $this->thumb_url; |
|
121
|
|
|
} |
|
122
|
|
|
|
|
123
|
|
|
/** |
|
124
|
|
|
* @param string $thumb_url |
|
125
|
|
|
* |
|
126
|
|
|
* @return $this |
|
127
|
|
|
*/ |
|
128
|
|
|
public function setThumbUrl($thumb_url) |
|
129
|
|
|
{ |
|
130
|
|
|
$this->thumb_url = $thumb_url; |
|
131
|
|
|
|
|
132
|
|
|
return $this; |
|
133
|
|
|
} |
|
134
|
|
|
} |