1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the Superdesk Web Publisher Bridge Component. |
5
|
|
|
* |
6
|
|
|
* Copyright 2017 Sourcefabric z.ú. and contributors. |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please see the |
9
|
|
|
* AUTHORS and LICENSE files distributed with this source code. |
10
|
|
|
* |
11
|
|
|
* @copyright 2017 Sourcefabric z.ú |
12
|
|
|
* @license http://www.superdesk.org/license |
13
|
|
|
*/ |
14
|
|
|
|
15
|
|
|
namespace SWP\Component\Bridge\Model; |
16
|
|
|
|
17
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
18
|
|
|
use SWP\Component\Bridge\Model\Event\Category; |
19
|
|
|
use SWP\Component\Bridge\Model\Event\Date; |
20
|
|
|
use SWP\Component\Bridge\Model\Event\Location; |
21
|
|
|
use SWP\Component\Bridge\Model\Event\OccurStatus; |
22
|
|
|
use SWP\Component\Common\Model\TimestampableInterface; |
23
|
|
|
use SWP\Component\Common\Model\TimestampableTrait; |
24
|
|
|
|
25
|
|
|
class Event implements TimestampableInterface, EventInterface |
26
|
|
|
{ |
27
|
|
|
use TimestampableTrait; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var string |
31
|
|
|
*/ |
32
|
|
|
protected $id; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @var string |
36
|
|
|
*/ |
37
|
|
|
protected $guid; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @var string |
41
|
|
|
*/ |
42
|
|
|
protected $etag; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @var string |
46
|
|
|
*/ |
47
|
|
|
protected $type; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* @var int |
51
|
|
|
*/ |
52
|
|
|
protected $version; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @var string |
56
|
|
|
*/ |
57
|
|
|
protected $ingestId; |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* @var string |
61
|
|
|
*/ |
62
|
|
|
protected $recurrenceId; |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @var string |
66
|
|
|
*/ |
67
|
|
|
protected $originalCreator; |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* @var string |
71
|
|
|
*/ |
72
|
|
|
protected $versionCreator; |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @var string |
76
|
|
|
*/ |
77
|
|
|
protected $ingestProvider; |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* @var string |
81
|
|
|
*/ |
82
|
|
|
protected $originalSource; |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @var string |
86
|
|
|
*/ |
87
|
|
|
protected $ingestProviderSequence; |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* @var string |
91
|
|
|
*/ |
92
|
|
|
protected $name; |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @var string |
96
|
|
|
*/ |
97
|
|
|
protected $definitionShort; |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* @var string |
101
|
|
|
*/ |
102
|
|
|
protected $definitionLong; |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* @var Category[] |
106
|
|
|
*/ |
107
|
|
|
protected $anpaCategory = []; |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* @var Date |
111
|
|
|
*/ |
112
|
|
|
protected $dates; |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @var Location[] |
116
|
|
|
*/ |
117
|
|
|
protected $locations = []; |
118
|
|
|
|
119
|
|
|
/** |
120
|
|
|
* @var OccurStatus |
121
|
|
|
*/ |
122
|
|
|
protected $occurStatus; |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* Event constructor. |
126
|
|
|
*/ |
127
|
|
|
public function __construct() |
128
|
|
|
{ |
129
|
|
|
$this->locations = new ArrayCollection(); |
|
|
|
|
130
|
|
|
$this->anpaCategory = new ArrayCollection(); |
|
|
|
|
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
/** |
134
|
|
|
* {@inheritdoc} |
135
|
|
|
*/ |
136
|
|
|
public function getId() |
137
|
|
|
{ |
138
|
|
|
return $this->id; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* {@inheritdoc} |
143
|
|
|
*/ |
144
|
|
|
public function getGuid() |
145
|
|
|
{ |
146
|
|
|
return $this->guid; |
147
|
|
|
} |
148
|
|
|
|
149
|
|
|
/** |
150
|
|
|
* {@inheritdoc} |
151
|
|
|
*/ |
152
|
|
|
public function setGuid($guid) |
153
|
|
|
{ |
154
|
|
|
$this->guid = $guid; |
155
|
|
|
} |
156
|
|
|
|
157
|
|
|
/** |
158
|
|
|
* {@inheritdoc} |
159
|
|
|
*/ |
160
|
|
|
public function getVersion() |
161
|
|
|
{ |
162
|
|
|
return $this->version; |
163
|
|
|
} |
164
|
|
|
|
165
|
|
|
/** |
166
|
|
|
* {@inheritdoc} |
167
|
|
|
*/ |
168
|
|
|
public function setVersion($version) |
169
|
|
|
{ |
170
|
|
|
$this->version = $version; |
171
|
|
|
} |
172
|
|
|
|
173
|
|
|
/** |
174
|
|
|
* {@inheritdoc} |
175
|
|
|
*/ |
176
|
|
|
public function getIngestId() |
177
|
|
|
{ |
178
|
|
|
return $this->ingestId; |
179
|
|
|
} |
180
|
|
|
|
181
|
|
|
/** |
182
|
|
|
* {@inheritdoc} |
183
|
|
|
*/ |
184
|
|
|
public function setIngestId($ingestId) |
185
|
|
|
{ |
186
|
|
|
$this->ingestId = $ingestId; |
187
|
|
|
} |
188
|
|
|
|
189
|
|
|
/** |
190
|
|
|
* {@inheritdoc} |
191
|
|
|
*/ |
192
|
|
|
public function getRecurrenceId() |
193
|
|
|
{ |
194
|
|
|
return $this->recurrenceId; |
195
|
|
|
} |
196
|
|
|
|
197
|
|
|
/** |
198
|
|
|
* {@inheritdoc} |
199
|
|
|
*/ |
200
|
|
|
public function setRecurrenceId($recurrenceId) |
201
|
|
|
{ |
202
|
|
|
$this->recurrenceId = $recurrenceId; |
203
|
|
|
} |
204
|
|
|
|
205
|
|
|
/** |
206
|
|
|
* {@inheritdoc} |
207
|
|
|
*/ |
208
|
|
|
public function getOriginalCreator() |
209
|
|
|
{ |
210
|
|
|
return $this->originalCreator; |
211
|
|
|
} |
212
|
|
|
|
213
|
|
|
/** |
214
|
|
|
* {@inheritdoc} |
215
|
|
|
*/ |
216
|
|
|
public function setOriginalCreator($originalCreator) |
217
|
|
|
{ |
218
|
|
|
$this->originalCreator = $originalCreator; |
219
|
|
|
} |
220
|
|
|
|
221
|
|
|
/** |
222
|
|
|
* {@inheritdoc} |
223
|
|
|
*/ |
224
|
|
|
public function getVersionCreator() |
225
|
|
|
{ |
226
|
|
|
return $this->versionCreator; |
227
|
|
|
} |
228
|
|
|
|
229
|
|
|
/** |
230
|
|
|
* {@inheritdoc} |
231
|
|
|
*/ |
232
|
|
|
public function setVersionCreator($versionCreator) |
233
|
|
|
{ |
234
|
|
|
$this->versionCreator = $versionCreator; |
235
|
|
|
} |
236
|
|
|
|
237
|
|
|
/** |
238
|
|
|
* {@inheritdoc} |
239
|
|
|
*/ |
240
|
|
|
public function getIngestProvider() |
241
|
|
|
{ |
242
|
|
|
return $this->ingestProvider; |
243
|
|
|
} |
244
|
|
|
|
245
|
|
|
/** |
246
|
|
|
* {@inheritdoc} |
247
|
|
|
*/ |
248
|
|
|
public function setIngestProvider($ingestProvider) |
249
|
|
|
{ |
250
|
|
|
$this->ingestProvider = $ingestProvider; |
251
|
|
|
} |
252
|
|
|
|
253
|
|
|
/** |
254
|
|
|
* {@inheritdoc} |
255
|
|
|
*/ |
256
|
|
|
public function getOriginalSource() |
257
|
|
|
{ |
258
|
|
|
return $this->originalSource; |
259
|
|
|
} |
260
|
|
|
|
261
|
|
|
/** |
262
|
|
|
* {@inheritdoc} |
263
|
|
|
*/ |
264
|
|
|
public function setOriginalSource($originalSource) |
265
|
|
|
{ |
266
|
|
|
$this->originalSource = $originalSource; |
267
|
|
|
} |
268
|
|
|
|
269
|
|
|
/** |
270
|
|
|
* {@inheritdoc} |
271
|
|
|
*/ |
272
|
|
|
public function getIngestProviderSequence() |
273
|
|
|
{ |
274
|
|
|
return $this->ingestProviderSequence; |
275
|
|
|
} |
276
|
|
|
|
277
|
|
|
/** |
278
|
|
|
* {@inheritdoc} |
279
|
|
|
*/ |
280
|
|
|
public function setIngestProviderSequence($ingestProviderSequence) |
281
|
|
|
{ |
282
|
|
|
$this->ingestProviderSequence = $ingestProviderSequence; |
283
|
|
|
} |
284
|
|
|
|
285
|
|
|
/** |
286
|
|
|
* {@inheritdoc} |
287
|
|
|
*/ |
288
|
|
|
public function getName() |
289
|
|
|
{ |
290
|
|
|
return $this->name; |
291
|
|
|
} |
292
|
|
|
|
293
|
|
|
/** |
294
|
|
|
* {@inheritdoc} |
295
|
|
|
*/ |
296
|
|
|
public function setName($name) |
297
|
|
|
{ |
298
|
|
|
$this->name = $name; |
299
|
|
|
} |
300
|
|
|
|
301
|
|
|
/** |
302
|
|
|
* {@inheritdoc} |
303
|
|
|
*/ |
304
|
|
|
public function getDefinitionShort() |
305
|
|
|
{ |
306
|
|
|
return $this->definitionShort; |
307
|
|
|
} |
308
|
|
|
|
309
|
|
|
/** |
310
|
|
|
* {@inheritdoc} |
311
|
|
|
*/ |
312
|
|
|
public function setDefinitionShort($definitionShort) |
313
|
|
|
{ |
314
|
|
|
$this->definitionShort = $definitionShort; |
315
|
|
|
} |
316
|
|
|
|
317
|
|
|
/** |
318
|
|
|
* {@inheritdoc} |
319
|
|
|
*/ |
320
|
|
|
public function getDefinitionLong() |
321
|
|
|
{ |
322
|
|
|
return $this->definitionLong; |
323
|
|
|
} |
324
|
|
|
|
325
|
|
|
/** |
326
|
|
|
* {@inheritdoc} |
327
|
|
|
*/ |
328
|
|
|
public function setDefinitionLong($definitionLong) |
329
|
|
|
{ |
330
|
|
|
$this->definitionLong = $definitionLong; |
331
|
|
|
} |
332
|
|
|
|
333
|
|
|
/** |
334
|
|
|
* {@inheritdoc} |
335
|
|
|
*/ |
336
|
|
|
public function getAnpaCategory() |
337
|
|
|
{ |
338
|
|
|
return $this->anpaCategory; |
|
|
|
|
339
|
|
|
} |
340
|
|
|
|
341
|
|
|
/** |
342
|
|
|
* {@inheritdoc} |
343
|
|
|
*/ |
344
|
|
|
public function setAnpaCategory($anpaCategory) |
345
|
|
|
{ |
346
|
|
|
$this->anpaCategory = $anpaCategory; |
|
|
|
|
347
|
|
|
} |
348
|
|
|
|
349
|
|
|
/** |
350
|
|
|
* {@inheritdoc} |
351
|
|
|
*/ |
352
|
|
|
public function getDates() |
353
|
|
|
{ |
354
|
|
|
return $this->dates; |
|
|
|
|
355
|
|
|
} |
356
|
|
|
|
357
|
|
|
/** |
358
|
|
|
* {@inheritdoc} |
359
|
|
|
*/ |
360
|
|
|
public function setDates($dates) |
361
|
|
|
{ |
362
|
|
|
$this->dates = $dates; |
|
|
|
|
363
|
|
|
} |
364
|
|
|
|
365
|
|
|
/** |
366
|
|
|
* {@inheritdoc} |
367
|
|
|
*/ |
368
|
|
|
public function getLocations() |
369
|
|
|
{ |
370
|
|
|
return $this->locations; |
|
|
|
|
371
|
|
|
} |
372
|
|
|
|
373
|
|
|
/** |
374
|
|
|
* {@inheritdoc} |
375
|
|
|
*/ |
376
|
|
|
public function setLocations($locations) |
377
|
|
|
{ |
378
|
|
|
$this->locations = $locations; |
|
|
|
|
379
|
|
|
} |
380
|
|
|
|
381
|
|
|
/** |
382
|
|
|
* {@inheritdoc} |
383
|
|
|
*/ |
384
|
|
|
public function getOccurStatus() |
385
|
|
|
{ |
386
|
|
|
return $this->occurStatus; |
|
|
|
|
387
|
|
|
} |
388
|
|
|
|
389
|
|
|
/** |
390
|
|
|
* {@inheritdoc} |
391
|
|
|
*/ |
392
|
|
|
public function setOccurStatus($occurStatus) |
393
|
|
|
{ |
394
|
|
|
$this->occurStatus = $occurStatus; |
|
|
|
|
395
|
|
|
} |
396
|
|
|
} |
397
|
|
|
|
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..