1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Created by PhpStorm. |
4
|
|
|
* User: iGusev |
5
|
|
|
* Date: 14/04/16 |
6
|
|
|
* Time: 15:45 |
7
|
|
|
*/ |
8
|
|
|
|
9
|
|
|
namespace TelegramBot\Api\Types\Inline\InputMessageContent; |
10
|
|
|
|
11
|
|
|
use TelegramBot\Api\BaseType; |
12
|
|
|
use TelegramBot\Api\TypeInterface; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* Class Venue |
16
|
|
|
* @see https://core.telegram.org/bots/api#inputvenuemessagecontent |
17
|
|
|
* |
18
|
|
|
* Represents the content of a venue message to be sent as the result of an inline query. |
19
|
|
|
* |
20
|
|
|
* @package TelegramBot\Api\Types\Inline |
21
|
|
|
*/ |
22
|
|
|
class Venue extends BaseType implements TypeInterface |
23
|
|
|
{ |
24
|
|
|
/** |
25
|
|
|
* {@inheritdoc} |
26
|
|
|
* |
27
|
|
|
* @var array |
28
|
|
|
*/ |
29
|
|
|
static protected $requiredParams = ['latitude', 'longitude', 'title', 'address']; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* {@inheritdoc} |
33
|
|
|
* |
34
|
|
|
* @var array |
35
|
|
|
*/ |
36
|
|
|
static protected $map = [ |
37
|
|
|
'latitude' => true, |
38
|
|
|
'longitude' => true, |
39
|
|
|
'title' => true, |
40
|
|
|
'address' => true, |
41
|
|
|
'foursquare_id' => true |
42
|
|
|
]; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* Latitude of the venue in degrees |
46
|
|
|
* |
47
|
|
|
* @var float |
48
|
|
|
*/ |
49
|
|
|
protected $latitude; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* Longitude of the venue in degrees |
53
|
|
|
* |
54
|
|
|
* @var float |
55
|
|
|
*/ |
56
|
|
|
protected $longitude; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* Name of the venue |
60
|
|
|
* |
61
|
|
|
* @var string |
62
|
|
|
*/ |
63
|
|
|
protected $title; |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Address of the venue |
67
|
|
|
* |
68
|
|
|
* @var string |
69
|
|
|
*/ |
70
|
|
|
protected $address; |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* Optional. Foursquare identifier of the venue, if known |
74
|
|
|
* |
75
|
|
|
* @var string |
76
|
|
|
*/ |
77
|
|
|
protected $foursquareId; |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* @return float |
81
|
|
|
*/ |
82
|
|
|
public function getLatitude() |
83
|
|
|
{ |
84
|
|
|
return $this->latitude; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* @param float $latitude |
89
|
|
|
*/ |
90
|
|
|
public function setLatitude($latitude) |
91
|
|
|
{ |
92
|
|
|
$this->latitude = $latitude; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @return float |
97
|
|
|
*/ |
98
|
|
|
public function getLongitude() |
99
|
|
|
{ |
100
|
|
|
return $this->longitude; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @param float $longitude |
105
|
|
|
*/ |
106
|
|
|
public function setLongitude($longitude) |
107
|
|
|
{ |
108
|
|
|
$this->longitude = $longitude; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* @return string |
113
|
|
|
*/ |
114
|
|
|
public function getTitle() |
115
|
|
|
{ |
116
|
|
|
return $this->title; |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
/** |
120
|
|
|
* @param string $title |
121
|
|
|
*/ |
122
|
|
|
public function setTitle($title) |
123
|
|
|
{ |
124
|
|
|
$this->title = $title; |
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
/** |
128
|
|
|
* @return string |
129
|
|
|
*/ |
130
|
|
|
public function getAddress() |
131
|
|
|
{ |
132
|
|
|
return $this->address; |
133
|
|
|
} |
134
|
|
|
|
135
|
|
|
/** |
136
|
|
|
* @param string $address |
137
|
|
|
*/ |
138
|
|
|
public function setAddress($address) |
139
|
|
|
{ |
140
|
|
|
$this->address = $address; |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* @return string |
145
|
|
|
*/ |
146
|
|
|
public function getFoursquareId() |
147
|
|
|
{ |
148
|
|
|
return $this->foursquareId; |
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* @param string $foursquareId |
153
|
|
|
*/ |
154
|
|
|
public function setFoursquareId($foursquareId) |
155
|
|
|
{ |
156
|
|
|
$this->foursquareId = $foursquareId; |
157
|
|
|
} |
158
|
|
|
} |
159
|
|
|
|