1 | <?php |
||
21 | class PulseUser extends ApiObject |
||
22 | { |
||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | const API_PREFIX = "users"; |
||
27 | |||
28 | /** |
||
29 | * The resource's URL. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $url; |
||
34 | |||
35 | /** |
||
36 | * The user's unique identifier. |
||
37 | * |
||
38 | * @var int |
||
39 | */ |
||
40 | protected $id; |
||
41 | |||
42 | /** |
||
43 | * The user's name. |
||
44 | * |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $name; |
||
48 | |||
49 | /** |
||
50 | * The user's email. |
||
51 | * |
||
52 | * @var string |
||
53 | */ |
||
54 | protected $email; |
||
55 | |||
56 | /** |
||
57 | * The user's photo_url. |
||
58 | * |
||
59 | * @var string |
||
60 | */ |
||
61 | protected $photo_url; |
||
62 | |||
63 | /** |
||
64 | * The user's title. |
||
65 | * |
||
66 | * @var string |
||
67 | */ |
||
68 | protected $title; |
||
69 | |||
70 | /** |
||
71 | * The user's position. |
||
72 | * |
||
73 | * @var string |
||
74 | */ |
||
75 | protected $position; |
||
76 | |||
77 | /** |
||
78 | * The user's phone. |
||
79 | * |
||
80 | * @var string |
||
81 | */ |
||
82 | protected $phone; |
||
83 | |||
84 | /** |
||
85 | * The user's location. |
||
86 | * |
||
87 | * @var string |
||
88 | */ |
||
89 | protected $location; |
||
90 | |||
91 | /** |
||
92 | * The user's status. |
||
93 | * |
||
94 | * @var string |
||
95 | */ |
||
96 | protected $status; |
||
97 | |||
98 | /** |
||
99 | * The user's birthday. |
||
100 | * |
||
101 | * @var string |
||
102 | */ |
||
103 | protected $birthday; |
||
104 | |||
105 | /** |
||
106 | * True if the user is guest, false otherwise |
||
107 | * |
||
108 | * @var bool |
||
109 | */ |
||
110 | protected $is_guest; |
||
111 | |||
112 | /** |
||
113 | * The user's skills. |
||
114 | * |
||
115 | * @var string[] |
||
116 | */ |
||
117 | protected $skills; |
||
118 | |||
119 | /** |
||
120 | * Creation time. |
||
121 | * |
||
122 | * @var \DateTime |
||
123 | */ |
||
124 | protected $created_at; |
||
125 | |||
126 | /** |
||
127 | * Last update time. |
||
128 | * |
||
129 | * @var \DateTime |
||
130 | */ |
||
131 | protected $updated_at; |
||
132 | |||
133 | /** |
||
134 | * The membership type of this user with respect to a specific Pulse or PulseBoard. This value will not be set if |
||
135 | * a PulseUser object is created standalone and not by another object which supports subscribers or membership. |
||
136 | * |
||
137 | * @var mixed |
||
138 | */ |
||
139 | protected $membership; |
||
140 | |||
141 | /** |
||
142 | * The URL pattern used for all calls |
||
143 | * |
||
144 | * @var string |
||
145 | */ |
||
146 | private $urlSyntax = "%s/%s/%s.json"; |
||
147 | |||
148 | // ================================================================================================================ |
||
149 | // Getter functions |
||
150 | // ================================================================================================================ |
||
151 | |||
152 | /** |
||
153 | * The resource's URL. |
||
154 | * |
||
155 | * @return string |
||
156 | */ |
||
157 | public function getUrl() |
||
161 | |||
162 | /** |
||
163 | * The user's unique identifier. |
||
164 | * |
||
165 | * @return int |
||
166 | */ |
||
167 | public function getId() |
||
171 | |||
172 | /** |
||
173 | * The user's name. |
||
174 | * |
||
175 | * @return string |
||
176 | */ |
||
177 | public function getName() |
||
181 | |||
182 | /** |
||
183 | * The user's email. |
||
184 | * |
||
185 | * @return string |
||
186 | */ |
||
187 | public function getEmail() |
||
191 | |||
192 | /** |
||
193 | * The user's photo_url. |
||
194 | * |
||
195 | * @return string |
||
196 | */ |
||
197 | public function getPhotoUrl() |
||
201 | |||
202 | /** |
||
203 | * The user's title. |
||
204 | * |
||
205 | * @return string |
||
206 | */ |
||
207 | public function getTitle() |
||
211 | |||
212 | /** |
||
213 | * The user's position. |
||
214 | * |
||
215 | * @return string |
||
216 | */ |
||
217 | public function getPosition() |
||
221 | |||
222 | /** |
||
223 | * The user's phone. |
||
224 | * |
||
225 | * @return string |
||
226 | */ |
||
227 | public function getPhone() |
||
231 | |||
232 | /** |
||
233 | * The user's location. |
||
234 | * |
||
235 | * @return string |
||
236 | */ |
||
237 | public function getLocation() |
||
241 | |||
242 | /** |
||
243 | * The user's status. |
||
244 | * |
||
245 | * @return string |
||
246 | */ |
||
247 | public function getStatus() |
||
251 | |||
252 | /** |
||
253 | * The user's birthday. |
||
254 | * |
||
255 | * @return string |
||
256 | */ |
||
257 | public function getBirthday() |
||
261 | |||
262 | /** |
||
263 | * True if the user is guest, false otherwise |
||
264 | * |
||
265 | * @return bool |
||
266 | */ |
||
267 | public function getIsGuest() |
||
271 | |||
272 | /** |
||
273 | * The user's skills. |
||
274 | * |
||
275 | * @return string[] |
||
276 | */ |
||
277 | public function getSkills() |
||
281 | |||
282 | /** |
||
283 | * Creation time. |
||
284 | * |
||
285 | * @return \DateTime |
||
286 | */ |
||
287 | public function getCreatedAt() |
||
291 | |||
292 | /** |
||
293 | * Last update time. |
||
294 | * |
||
295 | * @return \DateTime |
||
296 | */ |
||
297 | public function getUpdatedAt() |
||
301 | |||
302 | /** |
||
303 | * Get the membership level of this user with respect to the object that returned or created this instance. |
||
304 | * |
||
305 | * @throws IllegalAccessException This user was not created by an object which supports memberships |
||
306 | * |
||
307 | * @returns string The membership access; e.g. "admin", "subscriber" |
||
308 | */ |
||
309 | public function getMembership () |
||
318 | |||
319 | /** |
||
320 | * Get the user's newsfeed |
||
321 | * |
||
322 | * @param array $params GET parameters that need to be passed in the URL |
||
323 | * |
||
324 | * @since 0.1.0 |
||
325 | * |
||
326 | * @return PulseUpdate[] An array of PulseUpdates that make up the user's newsfeed |
||
327 | */ |
||
328 | public function getNewsFeed ($params = array()) |
||
334 | |||
335 | /** |
||
336 | * Get the user's posts |
||
337 | * |
||
338 | * @param array $params GET parameters that need to be passed in the URL |
||
339 | * |
||
340 | * @since 0.1.0 |
||
341 | * |
||
342 | * @return PulseUpdate[] An array of PulseUpdates for each of the posts |
||
343 | */ |
||
344 | public function getPosts ($params = array()) |
||
350 | |||
351 | /** |
||
352 | * Get the user's unread posts |
||
353 | * |
||
354 | * @param array $params GET parameters that need to be passed in the URL |
||
355 | * |
||
356 | * @since 0.1.0 |
||
357 | * |
||
358 | * @return PulseUpdate[] An array of PulseUpdates for each of the posts |
||
359 | */ |
||
360 | public function getUnreadFeed ($params = array()) |
||
366 | |||
367 | /** |
||
368 | * Get all of the users |
||
369 | * |
||
370 | * @param array $params GET parameters that need to be passed in the URL |
||
371 | * |
||
372 | * @since 0.1.0 |
||
373 | * |
||
374 | * @return PulseUser[] An array of PulseUsers for each of the users |
||
375 | */ |
||
376 | public static function getUsers ($params = array()) |
||
382 | } |
This check marks property names that have not been written in camelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes
databaseConnectionString
.