1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Created by PhpStorm. |
4
|
|
|
* User: iGusev |
5
|
|
|
* Date: 13/04/16 |
6
|
|
|
* Time: 13:55 |
7
|
|
|
*/ |
8
|
|
|
|
9
|
|
|
namespace TelegramBot\Api\Types; |
10
|
|
|
|
11
|
|
|
use TelegramBot\Api\BaseType; |
12
|
|
|
use TelegramBot\Api\TypeInterface; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* Class Venue |
16
|
|
|
* This object represents a venue |
17
|
|
|
* |
18
|
|
|
* @package TelegramBot\Api\Types |
19
|
|
|
*/ |
20
|
|
|
class Venue extends BaseType implements TypeInterface |
21
|
|
|
{ |
22
|
|
|
/** |
23
|
|
|
* {@inheritdoc} |
24
|
|
|
* |
25
|
|
|
* @var array |
26
|
|
|
*/ |
27
|
|
|
protected static $requiredParams = ['location', 'title', 'address']; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* {@inheritdoc} |
31
|
|
|
* |
32
|
|
|
* @var array |
33
|
|
|
*/ |
34
|
|
|
protected static $map = [ |
35
|
|
|
'location' => Location::class, |
36
|
|
|
'title' => true, |
37
|
|
|
'address' => true, |
38
|
|
|
'foursquare_id' => true, |
39
|
|
|
'foursquare_type' => true, |
40
|
|
|
'google_place_id' => true, |
41
|
|
|
'google_place_type' => true, |
42
|
|
|
]; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* Venue location |
46
|
|
|
* |
47
|
|
|
* @var Location |
48
|
|
|
*/ |
49
|
|
|
protected $location; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* Name of the venue |
53
|
|
|
* |
54
|
|
|
* @var string |
55
|
|
|
*/ |
56
|
|
|
protected $title; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* Address of the venue |
60
|
|
|
* |
61
|
|
|
* @var string |
62
|
|
|
*/ |
63
|
|
|
protected $address; |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Optional. Foursquare identifier of the venue |
67
|
|
|
* |
68
|
|
|
* @var string |
69
|
|
|
*/ |
70
|
|
|
protected $foursquareId; |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) |
74
|
|
|
* |
75
|
|
|
* @var string |
76
|
|
|
*/ |
77
|
|
|
protected $foursquareType; |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* Optional. Google Places identifier of the venue |
81
|
|
|
* |
82
|
|
|
* @var string |
83
|
|
|
*/ |
84
|
|
|
protected $googlePlaceId; |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* Optional. Google Places type of the venue. |
88
|
|
|
* |
89
|
|
|
* @var string |
90
|
|
|
*/ |
91
|
|
|
protected $googlePlaceType; |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @return Location |
95
|
|
|
*/ |
96
|
|
|
public function getLocation() |
97
|
|
|
{ |
98
|
|
|
return $this->location; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @param Location $location |
103
|
|
|
*/ |
104
|
|
|
public function setLocation($location) |
105
|
|
|
{ |
106
|
|
|
$this->location = $location; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* @return string |
111
|
|
|
*/ |
112
|
|
|
public function getTitle() |
113
|
|
|
{ |
114
|
|
|
return $this->title; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* @param string $title |
119
|
|
|
*/ |
120
|
|
|
public function setTitle($title) |
121
|
|
|
{ |
122
|
|
|
$this->title = $title; |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @return string |
127
|
|
|
*/ |
128
|
|
|
public function getAddress() |
129
|
|
|
{ |
130
|
|
|
return $this->address; |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
/** |
134
|
|
|
* @param string $address |
135
|
|
|
*/ |
136
|
|
|
public function setAddress($address) |
137
|
|
|
{ |
138
|
|
|
$this->address = $address; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* @return string |
143
|
|
|
*/ |
144
|
|
|
public function getFoursquareId() |
145
|
|
|
{ |
146
|
|
|
return $this->foursquareId; |
147
|
|
|
} |
148
|
|
|
|
149
|
|
|
/** |
150
|
|
|
* @param string $foursquareId |
151
|
|
|
*/ |
152
|
|
|
public function setFoursquareId($foursquareId) |
153
|
|
|
{ |
154
|
|
|
$this->foursquareId = $foursquareId; |
155
|
|
|
} |
156
|
|
|
|
157
|
|
|
/** |
158
|
|
|
* @return string |
159
|
|
|
*/ |
160
|
|
|
public function getFoursquareType() |
161
|
|
|
{ |
162
|
|
|
return $this->foursquareType; |
163
|
|
|
} |
164
|
|
|
|
165
|
|
|
/** |
166
|
|
|
* @param string $foursquareType |
167
|
|
|
*/ |
168
|
|
|
public function setFoursquareType($foursquareType) |
169
|
|
|
{ |
170
|
|
|
$this->foursquareType = $foursquareType; |
171
|
|
|
} |
172
|
|
|
|
173
|
|
|
/** |
174
|
|
|
* @return string |
175
|
|
|
*/ |
176
|
|
|
public function getGooglePlaceId() |
177
|
|
|
{ |
178
|
|
|
return $this->googlePlaceId; |
179
|
|
|
} |
180
|
|
|
|
181
|
|
|
/** |
182
|
|
|
* @param string $googlePlaceId |
183
|
|
|
*/ |
184
|
|
|
public function setGooglePlaceId($googlePlaceId) |
185
|
|
|
{ |
186
|
|
|
$this->googlePlaceId = $googlePlaceId; |
187
|
|
|
} |
188
|
|
|
|
189
|
|
|
/** |
190
|
|
|
* @return string |
191
|
|
|
*/ |
192
|
|
|
public function getGooglePlaceType() |
193
|
|
|
{ |
194
|
|
|
return $this->googlePlaceType; |
195
|
|
|
} |
196
|
|
|
|
197
|
|
|
/** |
198
|
|
|
* @param string $googlePlaceType |
199
|
|
|
*/ |
200
|
|
|
public function setGooglePlaceType($googlePlaceType) |
201
|
|
|
{ |
202
|
|
|
$this->googlePlaceType = $googlePlaceType; |
203
|
|
|
} |
204
|
|
|
} |
205
|
|
|
|