Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
25 - 1
<?php
2
/**
3
 * Copyright 2017 Facebook, Inc.
4
 *
5
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
 * use, copy, modify, and distribute this software in source code or binary
7
 * form for use in connection with the web services and APIs provided by
8
 * Facebook.
9
 *
10
 * As with any software that integrates with the Facebook platform, your use
11
 * of this software is subject to the Facebook Developer Principles and
12
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
 * shall be included in all copies or substantial portions of the software.
14
 *
15
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
 * DEALINGS IN THE SOFTWARE.
22
 *
23
 */
24
namespace Facebook\GraphNodes;
25
 
26
/**
27
 * Class GraphEvent
28
 *
29
 * @package Facebook
30
 */
31
class GraphEvent extends GraphNode
32
{
33
    /**
34
     * @var array Maps object key names to GraphNode types.
35
     */
36
    protected static $graphObjectMap = [
37
        'cover' => '\Facebook\GraphNodes\GraphCoverPhoto',
38
        'place' => '\Facebook\GraphNodes\GraphPage',
39
        'picture' => '\Facebook\GraphNodes\GraphPicture',
40
        'parent_group' => '\Facebook\GraphNodes\GraphGroup',
41
    ];
42
 
43
    /**
44
     * Returns the `id` (The event ID) as string if present.
45
     *
46
     * @return string|null
47
     */
48
    public function getId()
49
    {
50
        return $this->getField('id');
51
    }
52
 
53
    /**
54
     * Returns the `cover` (Cover picture) as GraphCoverPhoto if present.
55
     *
56
     * @return GraphCoverPhoto|null
57
     */
58
    public function getCover()
59
    {
60
        return $this->getField('cover');
61
    }
62
 
63
    /**
64
     * Returns the `description` (Long-form description) as string if present.
65
     *
66
     * @return string|null
67
     */
68
    public function getDescription()
69
    {
70
        return $this->getField('description');
71
    }
72
 
73
    /**
74
     * Returns the `end_time` (End time, if one has been set) as DateTime if present.
75
     *
76
     * @return \DateTime|null
77
     */
78
    public function getEndTime()
79
    {
80
        return $this->getField('end_time');
81
    }
82
 
83
    /**
84
     * Returns the `is_date_only` (Whether the event only has a date specified, but no time) as bool if present.
85
     *
86
     * @return bool|null
87
     */
88
    public function getIsDateOnly()
89
    {
90
        return $this->getField('is_date_only');
91
    }
92
 
93
    /**
94
     * Returns the `name` (Event name) as string if present.
95
     *
96
     * @return string|null
97
     */
98
    public function getName()
99
    {
100
        return $this->getField('name');
101
    }
102
 
103
    /**
104
     * Returns the `owner` (The profile that created the event) as GraphNode if present.
105
     *
106
     * @return GraphNode|null
107
     */
108
    public function getOwner()
109
    {
110
        return $this->getField('owner');
111
    }
112
 
113
    /**
114
     * Returns the `parent_group` (The group the event belongs to) as GraphGroup if present.
115
     *
116
     * @return GraphGroup|null
117
     */
118
    public function getParentGroup()
119
    {
120
        return $this->getField('parent_group');
121
    }
122
 
123
    /**
124
     * Returns the `place` (Event Place information) as GraphPage if present.
125
     *
126
     * @return GraphPage|null
127
     */
128
    public function getPlace()
129
    {
130
        return $this->getField('place');
131
    }
132
 
133
    /**
134
     * Returns the `privacy` (Who can see the event) as string if present.
135
     *
136
     * @return string|null
137
     */
138
    public function getPrivacy()
139
    {
140
        return $this->getField('privacy');
141
    }
142
 
143
    /**
144
     * Returns the `start_time` (Start time) as DateTime if present.
145
     *
146
     * @return \DateTime|null
147
     */
148
    public function getStartTime()
149
    {
150
        return $this->getField('start_time');
151
    }
152
 
153
    /**
154
     * Returns the `ticket_uri` (The link users can visit to buy a ticket to this event) as string if present.
155
     *
156
     * @return string|null
157
     */
158
    public function getTicketUri()
159
    {
160
        return $this->getField('ticket_uri');
161
    }
162
 
163
    /**
164
     * Returns the `timezone` (Timezone) as string if present.
165
     *
166
     * @return string|null
167
     */
168
    public function getTimezone()
169
    {
170
        return $this->getField('timezone');
171
    }
172
 
173
    /**
174
     * Returns the `updated_time` (Last update time) as DateTime if present.
175
     *
176
     * @return \DateTime|null
177
     */
178
    public function getUpdatedTime()
179
    {
180
        return $this->getField('updated_time');
181
    }
182
 
183
    /**
184
     * Returns the `picture` (Event picture) as GraphPicture if present.
185
     *
186
     * @return GraphPicture|null
187
     */
188
    public function getPicture()
189
    {
190
        return $this->getField('picture');
191
    }
192
 
193
    /**
194
     * Returns the `attending_count` (Number of people attending the event) as int if present.
195
     *
196
     * @return int|null
197
     */
198
    public function getAttendingCount()
199
    {
200
        return $this->getField('attending_count');
201
    }
202
 
203
    /**
204
     * Returns the `declined_count` (Number of people who declined the event) as int if present.
205
     *
206
     * @return int|null
207
     */
208
    public function getDeclinedCount()
209
    {
210
        return $this->getField('declined_count');
211
    }
212
 
213
    /**
214
     * Returns the `maybe_count` (Number of people who maybe going to the event) as int if present.
215
     *
216
     * @return int|null
217
     */
218
    public function getMaybeCount()
219
    {
220
        return $this->getField('maybe_count');
221
    }
222
 
223
    /**
224
     * Returns the `noreply_count` (Number of people who did not reply to the event) as int if present.
225
     *
226
     * @return int|null
227
     */
228
    public function getNoreplyCount()
229
    {
230
        return $this->getField('noreply_count');
231
    }
232
 
233
    /**
234
     * Returns the `invited_count` (Number of people invited to the event) as int if present.
235
     *
236
     * @return int|null
237
     */
238
    public function getInvitedCount()
239
    {
240
        return $this->getField('invited_count');
241
    }
242
}