|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace luya\web\jsonld; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* JsonLd - Event trait |
|
7
|
|
|
* |
|
8
|
|
|
* @see http://schema.org/Event |
|
9
|
|
|
* |
|
10
|
|
|
* @author Alex Schmid |
|
11
|
|
|
* @since 1.0.0 |
|
12
|
|
|
*/ |
|
13
|
|
|
trait EventTrait |
|
14
|
|
|
{ |
|
15
|
|
|
private $_about; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* @return Thing |
|
19
|
|
|
*/ |
|
20
|
|
|
public function getAbout() |
|
21
|
|
|
{ |
|
22
|
|
|
return $this->_about; |
|
23
|
|
|
} |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* The subject matter of the content. |
|
27
|
|
|
* Inverse property: subjectOf. |
|
28
|
|
|
* |
|
29
|
|
|
* @param Thing $about |
|
30
|
|
|
* @return EventTrait |
|
|
|
|
|
|
31
|
|
|
*/ |
|
32
|
|
|
public function setAbout($about) |
|
33
|
|
|
{ |
|
34
|
|
|
$this->_about = $about; |
|
35
|
|
|
return $this; |
|
36
|
|
|
} |
|
37
|
|
|
|
|
38
|
|
|
private $_actor; |
|
39
|
|
|
|
|
40
|
|
|
/** |
|
41
|
|
|
* @return Person |
|
42
|
|
|
*/ |
|
43
|
|
|
public function getActor() |
|
44
|
|
|
{ |
|
45
|
|
|
return $this->_actor; |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* An actor, e.g. in tv, radio, movie, video games etc., or in an event. |
|
50
|
|
|
* Actors can be associated with individual items or with a series, episode, clip. Supersedes actors. |
|
51
|
|
|
* |
|
52
|
|
|
* @param Person $actor |
|
53
|
|
|
* @return EventTrait |
|
|
|
|
|
|
54
|
|
|
*/ |
|
55
|
|
|
public function setActor($actor) |
|
56
|
|
|
{ |
|
57
|
|
|
$this->_actor = $actor; |
|
58
|
|
|
return $this; |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
private $_attendee; |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* @return Organization|Person |
|
65
|
|
|
*/ |
|
66
|
|
|
public function getAttendee() |
|
67
|
|
|
{ |
|
68
|
|
|
return $this->_attendee; |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
/** |
|
72
|
|
|
* A person or organization attending the event. Supersedes attendees. |
|
73
|
|
|
* |
|
74
|
|
|
* @param Organization|Person $attendee |
|
75
|
|
|
* @return EventTrait |
|
|
|
|
|
|
76
|
|
|
*/ |
|
77
|
|
|
public function setAttendee($attendee) |
|
78
|
|
|
{ |
|
79
|
|
|
$this->_attendee = $attendee; |
|
80
|
|
|
return $this; |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
private $_composer; |
|
84
|
|
|
|
|
85
|
|
|
/** |
|
86
|
|
|
* @return Organization|Person |
|
87
|
|
|
*/ |
|
88
|
|
|
public function getComposer() |
|
89
|
|
|
{ |
|
90
|
|
|
return $this->_composer; |
|
91
|
|
|
} |
|
92
|
|
|
|
|
93
|
|
|
/** |
|
94
|
|
|
* The person or organization who wrote a composition, or who is the composer of a work performed at some event. |
|
95
|
|
|
* |
|
96
|
|
|
* @param Organization|Person $composer |
|
97
|
|
|
* @return EventTrait |
|
|
|
|
|
|
98
|
|
|
*/ |
|
99
|
|
|
public function setComposer($composer) |
|
100
|
|
|
{ |
|
101
|
|
|
$this->_composer = $composer; |
|
102
|
|
|
return $this; |
|
103
|
|
|
} |
|
104
|
|
|
|
|
105
|
|
|
private $_contributor; |
|
106
|
|
|
|
|
107
|
|
|
/** |
|
108
|
|
|
* @return Organization|Person |
|
109
|
|
|
*/ |
|
110
|
|
|
public function getContributor() |
|
111
|
|
|
{ |
|
112
|
|
|
return $this->_contributor; |
|
113
|
|
|
} |
|
114
|
|
|
|
|
115
|
|
|
/** |
|
116
|
|
|
* A secondary contributor to the CreativeWork or Event. |
|
117
|
|
|
* |
|
118
|
|
|
* @param Organization|Person $contributor |
|
119
|
|
|
* @return EventTrait |
|
|
|
|
|
|
120
|
|
|
*/ |
|
121
|
|
|
public function setContributor($contributor) |
|
122
|
|
|
{ |
|
123
|
|
|
$this->_contributor = $contributor; |
|
124
|
|
|
return $this; |
|
125
|
|
|
} |
|
126
|
|
|
|
|
127
|
|
|
private $_director; |
|
128
|
|
|
|
|
129
|
|
|
/** |
|
130
|
|
|
* @return Person |
|
131
|
|
|
*/ |
|
132
|
|
|
public function getDirector() |
|
133
|
|
|
{ |
|
134
|
|
|
return $this->_director; |
|
135
|
|
|
} |
|
136
|
|
|
|
|
137
|
|
|
/** |
|
138
|
|
|
* A director of e.g. tv, radio, movie, video gaming etc. content, or of an event. |
|
139
|
|
|
* Directors can be associated with individual items or with a series, episode, clip. |
|
140
|
|
|
* Supersedes directors. |
|
141
|
|
|
* |
|
142
|
|
|
* @param Person $director |
|
143
|
|
|
* @return EventTrait |
|
|
|
|
|
|
144
|
|
|
*/ |
|
145
|
|
|
public function setDirector($director) |
|
146
|
|
|
{ |
|
147
|
|
|
$this->_director = $director; |
|
148
|
|
|
return $this; |
|
149
|
|
|
} |
|
150
|
|
|
|
|
151
|
|
|
private $_doorTime; |
|
152
|
|
|
|
|
153
|
|
|
/** |
|
154
|
|
|
* @return DateTime |
|
155
|
|
|
*/ |
|
156
|
|
|
public function getDoorTime() |
|
157
|
|
|
{ |
|
158
|
|
|
return $this->_doorTime; |
|
159
|
|
|
} |
|
160
|
|
|
|
|
161
|
|
|
/** |
|
162
|
|
|
* The time admission will commence. |
|
163
|
|
|
* |
|
164
|
|
|
* @param DateTime $doorTime |
|
165
|
|
|
* @return EventTrait |
|
|
|
|
|
|
166
|
|
|
*/ |
|
167
|
|
|
public function setDoorTime($doorTime) |
|
168
|
|
|
{ |
|
169
|
|
|
$this->_doorTime = $doorTime; |
|
170
|
|
|
return $this; |
|
171
|
|
|
} |
|
172
|
|
|
|
|
173
|
|
|
private $_duration; |
|
174
|
|
|
|
|
175
|
|
|
/** |
|
176
|
|
|
* @return Duration |
|
177
|
|
|
*/ |
|
178
|
|
|
public function getDuration() |
|
179
|
|
|
{ |
|
180
|
|
|
return $this->_duration; |
|
181
|
|
|
} |
|
182
|
|
|
|
|
183
|
|
|
/** |
|
184
|
|
|
* The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. |
|
185
|
|
|
* |
|
186
|
|
|
* @param Duration $duration |
|
187
|
|
|
* @return EventTrait |
|
|
|
|
|
|
188
|
|
|
*/ |
|
189
|
|
|
public function setDuration($duration) |
|
190
|
|
|
{ |
|
191
|
|
|
$this->_duration = $duration; |
|
192
|
|
|
return $this; |
|
193
|
|
|
} |
|
194
|
|
|
|
|
195
|
|
|
private $_endDate; |
|
196
|
|
|
|
|
197
|
|
|
/** |
|
198
|
|
|
* @return Date|DateTime |
|
199
|
|
|
*/ |
|
200
|
|
|
public function getEndDate() |
|
201
|
|
|
{ |
|
202
|
|
|
return $this->_endDate; |
|
203
|
|
|
} |
|
204
|
|
|
|
|
205
|
|
|
/** |
|
206
|
|
|
* The end date and time of the item (in ISO 8601 date format). |
|
207
|
|
|
* |
|
208
|
|
|
* @param Date|DateTime $endDate |
|
209
|
|
|
* @return EventTrait |
|
|
|
|
|
|
210
|
|
|
*/ |
|
211
|
|
|
public function setEndDate($endDate) |
|
212
|
|
|
{ |
|
213
|
|
|
$this->_endDate = $endDate; |
|
214
|
|
|
return $this; |
|
215
|
|
|
} |
|
216
|
|
|
|
|
217
|
|
|
private $_funder; |
|
218
|
|
|
|
|
219
|
|
|
/** |
|
220
|
|
|
* @return Organization|Person |
|
221
|
|
|
*/ |
|
222
|
|
|
public function getFunder() |
|
223
|
|
|
{ |
|
224
|
|
|
return $this->_funder; |
|
225
|
|
|
} |
|
226
|
|
|
|
|
227
|
|
|
/** |
|
228
|
|
|
* A person or organization that supports (sponsors) something through some kind of financial contribution. |
|
229
|
|
|
* |
|
230
|
|
|
* @param Organization|Person $funder |
|
231
|
|
|
* @return EventTrait |
|
|
|
|
|
|
232
|
|
|
*/ |
|
233
|
|
|
public function setFunder($funder) |
|
234
|
|
|
{ |
|
235
|
|
|
$this->_funder = $funder; |
|
236
|
|
|
return $this; |
|
237
|
|
|
} |
|
238
|
|
|
|
|
239
|
|
|
private $_inLanguage; |
|
240
|
|
|
|
|
241
|
|
|
/** |
|
242
|
|
|
* @return Language|Text |
|
243
|
|
|
*/ |
|
244
|
|
|
public function getInLanguage() |
|
245
|
|
|
{ |
|
246
|
|
|
return $this->_inLanguage; |
|
247
|
|
|
} |
|
248
|
|
|
|
|
249
|
|
|
/** |
|
250
|
|
|
* The language of the content or performance or used in an action. |
|
251
|
|
|
* Please use one of the language codes from the IETF BCP 47 standard. See also availableLanguage. |
|
252
|
|
|
* Supersedes language. |
|
253
|
|
|
* |
|
254
|
|
|
* @param Language|Text $inLanguage |
|
255
|
|
|
* @return EventTrait |
|
|
|
|
|
|
256
|
|
|
*/ |
|
257
|
|
|
public function setInLanguage($inLanguage) |
|
258
|
|
|
{ |
|
259
|
|
|
$this->_inLanguage = $inLanguage; |
|
260
|
|
|
return $this; |
|
261
|
|
|
} |
|
262
|
|
|
|
|
263
|
|
|
private $_isAccessibleForFree; |
|
264
|
|
|
|
|
265
|
|
|
/** |
|
266
|
|
|
* @return bool |
|
267
|
|
|
*/ |
|
268
|
|
|
public function isAccessibleForFree() |
|
269
|
|
|
{ |
|
270
|
|
|
return $this->_isAccessibleForFree; |
|
271
|
|
|
} |
|
272
|
|
|
|
|
273
|
|
|
/** |
|
274
|
|
|
* A flag to signal that the item, event, or place is accessible for free. Supersedes free. |
|
275
|
|
|
* |
|
276
|
|
|
* @param bool $isAccessibleForFree |
|
277
|
|
|
* @return EventTrait |
|
|
|
|
|
|
278
|
|
|
*/ |
|
279
|
|
|
public function setIsAccessibleForFree($isAccessibleForFree) |
|
280
|
|
|
{ |
|
281
|
|
|
$this->_isAccessibleForFree = $isAccessibleForFree; |
|
282
|
|
|
return $this; |
|
283
|
|
|
} |
|
284
|
|
|
|
|
285
|
|
|
private $_location; |
|
286
|
|
|
|
|
287
|
|
|
/** |
|
288
|
|
|
* @return Place|PostalAddress|string |
|
289
|
|
|
*/ |
|
290
|
|
|
public function getLocation() |
|
291
|
|
|
{ |
|
292
|
|
|
return $this->_location; |
|
293
|
|
|
} |
|
294
|
|
|
|
|
295
|
|
|
/** |
|
296
|
|
|
* The location of for example where the event is happening, an organization is located, |
|
297
|
|
|
* or where an action takes place. |
|
298
|
|
|
* |
|
299
|
|
|
* @param Place|PostalAddress|string $location |
|
300
|
|
|
* @return EventTrait |
|
|
|
|
|
|
301
|
|
|
*/ |
|
302
|
|
|
public function setLocation($location) |
|
303
|
|
|
{ |
|
304
|
|
|
$this->_location = $location; |
|
305
|
|
|
return $this; |
|
306
|
|
|
} |
|
307
|
|
|
|
|
308
|
|
|
private $_maximumAttendeeCapacity; |
|
309
|
|
|
|
|
310
|
|
|
/** |
|
311
|
|
|
* @return int |
|
312
|
|
|
*/ |
|
313
|
|
|
public function getMaximumAttendeeCapacity() |
|
314
|
|
|
{ |
|
315
|
|
|
return $this->_maximumAttendeeCapacity; |
|
316
|
|
|
} |
|
317
|
|
|
|
|
318
|
|
|
/** |
|
319
|
|
|
* The total number of individuals that may attend an event or venue. |
|
320
|
|
|
* |
|
321
|
|
|
* @param int $maximumAttendeeCapacity |
|
322
|
|
|
*/ |
|
323
|
|
|
public function setMaximumAttendeeCapacity($maximumAttendeeCapacity) |
|
324
|
|
|
{ |
|
325
|
|
|
$this->_maximumAttendeeCapacity = $maximumAttendeeCapacity; |
|
326
|
|
|
} |
|
327
|
|
|
|
|
328
|
|
|
private $_organizer; |
|
329
|
|
|
|
|
330
|
|
|
/** |
|
331
|
|
|
* @return Organization|Person |
|
332
|
|
|
*/ |
|
333
|
|
|
public function getOrganizer() |
|
334
|
|
|
{ |
|
335
|
|
|
return $this->_organizer; |
|
336
|
|
|
} |
|
337
|
|
|
|
|
338
|
|
|
/** |
|
339
|
|
|
* An organizer of an Event. |
|
340
|
|
|
* |
|
341
|
|
|
* @param Organization|Person $organizer |
|
342
|
|
|
* @return EventTrait |
|
|
|
|
|
|
343
|
|
|
*/ |
|
344
|
|
|
public function setOrganizer($organizer) |
|
345
|
|
|
{ |
|
346
|
|
|
$this->_organizer = $organizer; |
|
347
|
|
|
return $this; |
|
348
|
|
|
} |
|
349
|
|
|
|
|
350
|
|
|
private $_performer; |
|
351
|
|
|
|
|
352
|
|
|
/** |
|
353
|
|
|
* @return Organization|Person |
|
354
|
|
|
*/ |
|
355
|
|
|
public function getPerformer() |
|
356
|
|
|
{ |
|
357
|
|
|
return $this->_performer; |
|
358
|
|
|
} |
|
359
|
|
|
|
|
360
|
|
|
/** |
|
361
|
|
|
* A performer at the event—for example, a presenter, musician, musical group or actor. |
|
362
|
|
|
* Supersedes performers. |
|
363
|
|
|
* |
|
364
|
|
|
* @param Organization|Person $performer |
|
365
|
|
|
* @return EventTrait |
|
|
|
|
|
|
366
|
|
|
*/ |
|
367
|
|
|
public function setPerformer($performer) |
|
368
|
|
|
{ |
|
369
|
|
|
$this->_performer = $performer; |
|
370
|
|
|
return $this; |
|
371
|
|
|
} |
|
372
|
|
|
|
|
373
|
|
|
private $_previousStartDate; |
|
374
|
|
|
|
|
375
|
|
|
/** |
|
376
|
|
|
* @return string |
|
377
|
|
|
*/ |
|
378
|
|
|
public function getPreviousStartDate() |
|
379
|
|
|
{ |
|
380
|
|
|
return $this->_previousStartDate; |
|
381
|
|
|
} |
|
382
|
|
|
|
|
383
|
|
|
/** |
|
384
|
|
|
* Used in conjunction with eventStatus for rescheduled or cancelled events. |
|
385
|
|
|
* This property contains the previously scheduled start date. |
|
386
|
|
|
* For rescheduled events, the startDate property should be used for the newly scheduled start date. |
|
387
|
|
|
* In the (rare) case of an event that has been postponed and rescheduled multiple times, |
|
388
|
|
|
* this field may be repeated. |
|
389
|
|
|
* |
|
390
|
|
|
* @param DateValue $previousStartDate |
|
391
|
|
|
* @return EventTrait |
|
|
|
|
|
|
392
|
|
|
*/ |
|
393
|
|
|
public function setPreviousStartDate(DateValue $previousStartDate) |
|
394
|
|
|
{ |
|
395
|
|
|
$this->_previousStartDate = $previousStartDate; |
|
396
|
|
|
return $this; |
|
397
|
|
|
} |
|
398
|
|
|
|
|
399
|
|
|
private $_recordedIn; |
|
400
|
|
|
|
|
401
|
|
|
/** |
|
402
|
|
|
* @return CreativeWork |
|
403
|
|
|
*/ |
|
404
|
|
|
public function getRecordedIn() |
|
405
|
|
|
{ |
|
406
|
|
|
return $this->_recordedIn; |
|
407
|
|
|
} |
|
408
|
|
|
|
|
409
|
|
|
/** |
|
410
|
|
|
* The CreativeWork that captured all or part of this Event. |
|
411
|
|
|
* Inverse property: recordedAt |
|
412
|
|
|
* |
|
413
|
|
|
* @param CreativeWork $recordedIn |
|
414
|
|
|
* @return EventTrait |
|
|
|
|
|
|
415
|
|
|
*/ |
|
416
|
|
|
public function setRecordedIn(CreativeWork $recordedIn) |
|
417
|
|
|
{ |
|
418
|
|
|
$this->_recordedIn = $recordedIn; |
|
419
|
|
|
return $this; |
|
420
|
|
|
} |
|
421
|
|
|
|
|
422
|
|
|
private $_remainingAttendeeCapacity; |
|
423
|
|
|
|
|
424
|
|
|
/** |
|
425
|
|
|
* @return int |
|
426
|
|
|
*/ |
|
427
|
|
|
public function getRemainingAttendeeCapacity() |
|
428
|
|
|
{ |
|
429
|
|
|
return $this->_remainingAttendeeCapacity; |
|
430
|
|
|
} |
|
431
|
|
|
|
|
432
|
|
|
/** |
|
433
|
|
|
* The number of attendee places for an event that remain unallocated. |
|
434
|
|
|
* |
|
435
|
|
|
* @param int $remainingAttendeeCapacity |
|
436
|
|
|
* @return EventTrait |
|
|
|
|
|
|
437
|
|
|
*/ |
|
438
|
|
|
public function setRemainingAttendeeCapacity($remainingAttendeeCapacity) |
|
439
|
|
|
{ |
|
440
|
|
|
$this->_remainingAttendeeCapacity = $remainingAttendeeCapacity; |
|
441
|
|
|
return $this; |
|
442
|
|
|
} |
|
443
|
|
|
|
|
444
|
|
|
private $_sponsor; |
|
445
|
|
|
|
|
446
|
|
|
/** |
|
447
|
|
|
* @return Organization|Person |
|
448
|
|
|
*/ |
|
449
|
|
|
public function getSponsor() |
|
450
|
|
|
{ |
|
451
|
|
|
return $this->_sponsor; |
|
452
|
|
|
} |
|
453
|
|
|
|
|
454
|
|
|
/** |
|
455
|
|
|
* A person or organization that supports a thing through a pledge, promise, or financial contribution. |
|
456
|
|
|
* e.g. a sponsor of a Medical Study or a corporate sponsor of an event. |
|
457
|
|
|
* |
|
458
|
|
|
* @param Organization|Person $sponsor |
|
459
|
|
|
* @return EventTrait |
|
|
|
|
|
|
460
|
|
|
*/ |
|
461
|
|
|
public function setSponsor($sponsor) |
|
462
|
|
|
{ |
|
463
|
|
|
$this->_sponsor = $sponsor; |
|
464
|
|
|
return $this; |
|
465
|
|
|
} |
|
466
|
|
|
|
|
467
|
|
|
private $_startDate; |
|
468
|
|
|
|
|
469
|
|
|
/** |
|
470
|
|
|
* @return Date|DateTime |
|
471
|
|
|
*/ |
|
472
|
|
|
public function getStartDate() |
|
473
|
|
|
{ |
|
474
|
|
|
return $this->_startDate; |
|
475
|
|
|
} |
|
476
|
|
|
|
|
477
|
|
|
/** |
|
478
|
|
|
* The start date and time of the item (in ISO 8601 date format). |
|
479
|
|
|
* |
|
480
|
|
|
* @param DateTimeValue $startDate |
|
481
|
|
|
* @return EventTrait |
|
|
|
|
|
|
482
|
|
|
*/ |
|
483
|
|
|
public function setStartDate(DateTimeValue $startDate) |
|
484
|
|
|
{ |
|
485
|
|
|
$this->_startDate = $startDate; |
|
486
|
|
|
return $this; |
|
487
|
|
|
} |
|
488
|
|
|
|
|
489
|
|
|
private $_subEvent; |
|
490
|
|
|
|
|
491
|
|
|
/** |
|
492
|
|
|
* @return Event |
|
493
|
|
|
*/ |
|
494
|
|
|
public function getSubEvent() |
|
495
|
|
|
{ |
|
496
|
|
|
return $this->_subEvent; |
|
497
|
|
|
} |
|
498
|
|
|
|
|
499
|
|
|
/** |
|
500
|
|
|
* An Event that is part of this event. |
|
501
|
|
|
* For example, a conference event includes many presentations, each of which is a subEvent of the conference. |
|
502
|
|
|
* Supersedes subEvents. |
|
503
|
|
|
* Inverse property: superEvent. |
|
504
|
|
|
* |
|
505
|
|
|
* @param Event $subEvent |
|
506
|
|
|
*/ |
|
507
|
|
|
public function setSubEvent(Event $subEvent) |
|
508
|
|
|
{ |
|
509
|
|
|
$this->_subEvent = $subEvent; |
|
510
|
|
|
} |
|
511
|
|
|
|
|
512
|
|
|
private $_superEvent; |
|
513
|
|
|
|
|
514
|
|
|
/** |
|
515
|
|
|
* @return Event |
|
516
|
|
|
*/ |
|
517
|
|
|
public function getSuperEvent() |
|
518
|
|
|
{ |
|
519
|
|
|
return $this->_superEvent; |
|
520
|
|
|
} |
|
521
|
|
|
|
|
522
|
|
|
/** |
|
523
|
|
|
* An event that this event is a part of. |
|
524
|
|
|
* For example, a collection of individual music performances might each have a music festival as their superEvent. |
|
525
|
|
|
* Inverse property: subEvent. |
|
526
|
|
|
* |
|
527
|
|
|
* @param Event $superEvent |
|
528
|
|
|
* @return EventTrait |
|
|
|
|
|
|
529
|
|
|
*/ |
|
530
|
|
|
public function setSuperEvent(Event $superEvent) |
|
531
|
|
|
{ |
|
532
|
|
|
$this->_superEvent = $superEvent; |
|
533
|
|
|
return $this; |
|
534
|
|
|
} |
|
535
|
|
|
|
|
536
|
|
|
private $_translator; |
|
537
|
|
|
|
|
538
|
|
|
/** |
|
539
|
|
|
* @return Organization|Person |
|
540
|
|
|
*/ |
|
541
|
|
|
public function getTranslator() |
|
542
|
|
|
{ |
|
543
|
|
|
return $this->_translator; |
|
544
|
|
|
} |
|
545
|
|
|
|
|
546
|
|
|
/** |
|
547
|
|
|
* Organization or person who adapts a creative work to different languages, regional differences |
|
548
|
|
|
* and technical requirements of a target market, or that translates during some event. |
|
549
|
|
|
* |
|
550
|
|
|
* @param Organization|Person $translator |
|
551
|
|
|
* @return EventTrait |
|
|
|
|
|
|
552
|
|
|
*/ |
|
553
|
|
|
public function setTranslator($translator) |
|
554
|
|
|
{ |
|
555
|
|
|
$this->_translator = $translator; |
|
556
|
|
|
return $this; |
|
557
|
|
|
} |
|
558
|
|
|
|
|
559
|
|
|
private $_typicalAgeRange; |
|
560
|
|
|
|
|
561
|
|
|
/** |
|
562
|
|
|
* @return string |
|
563
|
|
|
*/ |
|
564
|
|
|
public function getTypicalAgeRange() |
|
565
|
|
|
{ |
|
566
|
|
|
return $this->_typicalAgeRange; |
|
567
|
|
|
} |
|
568
|
|
|
|
|
569
|
|
|
/** |
|
570
|
|
|
* The typical expected age range, e.g. '7-9', '11-'. |
|
571
|
|
|
* |
|
572
|
|
|
* @param string $typicalAgeRange |
|
573
|
|
|
* @return EventTrait |
|
|
|
|
|
|
574
|
|
|
*/ |
|
575
|
|
|
public function setTypicalAgeRange($typicalAgeRange) |
|
576
|
|
|
{ |
|
577
|
|
|
$this->_typicalAgeRange = $typicalAgeRange; |
|
578
|
|
|
return $this; |
|
579
|
|
|
} |
|
580
|
|
|
|
|
581
|
|
|
private $_workFeatured; |
|
582
|
|
|
|
|
583
|
|
|
/** |
|
584
|
|
|
* @return CreativeWork |
|
585
|
|
|
*/ |
|
586
|
|
|
public function getWorkFeatured() |
|
587
|
|
|
{ |
|
588
|
|
|
return $this->_workFeatured; |
|
589
|
|
|
} |
|
590
|
|
|
|
|
591
|
|
|
/** |
|
592
|
|
|
* A work featured in some event, e.g. exhibited in an ExhibitionEvent. |
|
593
|
|
|
* Specific subproperties are available for workPerformed (e.g. a play), |
|
594
|
|
|
* or a workPresented (a Movie at a ScreeningEvent). |
|
595
|
|
|
* |
|
596
|
|
|
* @param CreativeWork $workFeatured |
|
597
|
|
|
* @return EventTrait |
|
|
|
|
|
|
598
|
|
|
*/ |
|
599
|
|
|
public function setWorkFeatured(CreativeWork $workFeatured) |
|
600
|
|
|
{ |
|
601
|
|
|
$this->_workFeatured = $workFeatured; |
|
602
|
|
|
return $this; |
|
603
|
|
|
} |
|
604
|
|
|
|
|
605
|
|
|
private $_workPerformed; |
|
606
|
|
|
|
|
607
|
|
|
/** |
|
608
|
|
|
* @return CreativeWork |
|
609
|
|
|
*/ |
|
610
|
|
|
public function getWorkPerformed() |
|
611
|
|
|
{ |
|
612
|
|
|
return $this->_workPerformed; |
|
613
|
|
|
} |
|
614
|
|
|
|
|
615
|
|
|
/** |
|
616
|
|
|
* A work performed in some event, for example a play performed in a TheaterEvent. |
|
617
|
|
|
* |
|
618
|
|
|
* @param CreativeWork $workPerformed |
|
619
|
|
|
* @return EventTrait |
|
|
|
|
|
|
620
|
|
|
*/ |
|
621
|
|
|
public function setWorkPerformed(CreativeWork $workPerformed) |
|
622
|
|
|
{ |
|
623
|
|
|
$this->_workPerformed = $workPerformed; |
|
624
|
|
|
return $this; |
|
625
|
|
|
} |
|
626
|
|
|
} |
|
627
|
|
|
|
In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.
If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.