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