Completed
Push — master ( 8d3dbf...7592af )
by Paweł
62:36
created

BaseContent::setEdNote()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
/*
4
 * This file is part of the Superdesk Web Publisher Bridge Component.
5
 *
6
 * Copyright 2016 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 2016 Sourcefabric z.ú
12
 * @license http://www.superdesk.org/license
13
 */
14
15
namespace SWP\Component\Bridge\Model;
16
17
class BaseContent implements ContentInterface
18
{
19
    /**
20
     * @var mixed
21
     */
22
    protected $id;
23
24
    /**
25
     * @var string
26
     */
27
    protected $guid;
28
29
    /**
30
     * @var string
31
     */
32
    protected $headline;
33
34
    /**
35
     * @var string
36
     */
37
    protected $byline;
38
39
    /**
40
     * @var string
41
     */
42
    protected $slugline;
43
44
    /**
45
     * @var string
46
     */
47
    protected $language;
48
49
    /**
50
     * @var array
51
     */
52
    protected $subjects = [];
53
54
    /**
55
     * @var string
56
     */
57
    protected $type;
58
59
    /**
60
     * @var array
61
     */
62
    protected $places = [];
63
64
    /**
65
     * @var array
66
     */
67
    protected $services = [];
68
69
    /**
70
     * @var string
71
     */
72
    protected $located;
73
74
    /**
75
     * @var int
76
     */
77
    protected $urgency;
78
79
    /**
80
     * @var int
81
     */
82
    protected $priority;
83
84
    /**
85
     * @var int
86
     */
87
    protected $version;
88
89
    /**
90
     * @var string
91
     */
92
    protected $genre;
93
94
    /**
95
     * @var string
96
     */
97
    protected $edNote;
98
99
    /**
100
     * @var string
101
     */
102
    protected $description;
103
104
    /**
105
     * @var array
106
     */
107
    protected $keywords = [];
108
109
    /**
110
     * @return mixed
111
     */
112
    public function getId()
113
    {
114
        return $this->id;
115
    }
116
117
    /**
118
     * {@inheritdoc}
119
     */
120
    public function setId($id)
121
    {
122
        $this->id = $id;
123
    }
124
125
    /**
126
     * {@inheritdoc}
127
     */
128 11
    public function getByline()
129
    {
130 11
        return $this->byline;
131
    }
132
133
    /**
134
     * {@inheritdoc}
135
     */
136
    public function setByline($byline)
137
    {
138
        $this->byline = $byline;
139
    }
140
141
    /**
142
     * {@inheritdoc}
143
     */
144 11
    public function getSlugline()
145
    {
146 11
        return $this->slugline;
147
    }
148
149
    /**
150
     * {@inheritdoc}
151
     */
152
    public function setSlugline($slugline)
153
    {
154
        $this->slugline = $slugline;
155
    }
156
157
    /**
158
     * {@inheritdoc}
159
     */
160 11
    public function getLanguage()
161
    {
162 11
        return $this->language;
163
    }
164
165
    /**
166
     * {@inheritdoc}
167
     */
168
    public function setLanguage($language)
169
    {
170
        $this->language = $language;
171
    }
172
173
    /**
174
     * {@inheritdoc}
175
     */
176 11
    public function getSubjects()
177
    {
178 11
        return $this->subjects;
179
    }
180
181
    /**
182
     * {@inheritdoc}
183
     */
184
    public function setSubjects(array $subjects = [])
185
    {
186
        $this->subjects = $subjects;
187
    }
188
189
    /**
190
     * {@inheritdoc}
191
     */
192 11
    public function getType()
193
    {
194 11
        return $this->type;
195
    }
196
197
    /**
198
     * {@inheritdoc}
199
     */
200
    public function setType($type)
201
    {
202
        $this->type = $type;
203
    }
204
205
    /**
206
     * {@inheritdoc}
207
     */
208 11
    public function getPlaces()
209
    {
210 11
        return $this->places;
211
    }
212
213
    /**
214
     * {@inheritdoc}
215
     */
216
    public function setPlaces($places)
217
    {
218
        $this->places = $places;
219
    }
220
221
    /**
222
     * {@inheritdoc}
223
     */
224 11
    public function getLocated()
225
    {
226 11
        return $this->located;
227
    }
228
229
    /**
230
     * {@inheritdoc}
231
     */
232
    public function setLocated($located)
233
    {
234
        $this->located = $located;
235
    }
236
237
    /**
238
     * {@inheritdoc}
239
     */
240 11
    public function getUrgency()
241
    {
242 11
        return $this->urgency;
243
    }
244
245
    /**
246
     * {@inheritdoc}
247
     */
248
    public function setUrgency($urgency)
249
    {
250
        $this->urgency = $urgency;
251
    }
252
253
    /**
254
     * {@inheritdoc}
255
     */
256 11
    public function getPriority()
257
    {
258 11
        return $this->priority;
259
    }
260
261
    /**
262
     * {@inheritdoc}
263
     */
264
    public function setPriority($priority)
265
    {
266
        $this->priority = $priority;
267
    }
268
269
    /**
270
     * {@inheritdoc}
271
     */
272
    public function getVersion()
273
    {
274
        return $this->version;
275
    }
276
277
    /**
278
     * {@inheritdoc}
279
     */
280
    public function setVersion($version)
281
    {
282
        $this->version = $version;
283
    }
284
285
    /**
286
     * {@inheritdoc}
287
     */
288 11
    public function getHeadline()
289
    {
290 11
        return $this->headline;
291
    }
292
293
    /**
294
     * {@inheritdoc}
295
     */
296
    public function setHeadline($headline)
297
    {
298
        $this->headline = $headline;
299
    }
300
301
    /**
302
     * {@inheritdoc}
303
     */
304 11
    public function getGuid()
305
    {
306 11
        return $this->guid;
307
    }
308
309
    /**
310
     * {@inheritdoc}
311
     */
312
    public function setGuid($guid)
313
    {
314
        $this->guid = $guid;
315
    }
316
317
    /**
318
     * {@inheritdoc}
319
     */
320 11
    public function getServices()
321
    {
322 11
        return $this->services;
323
    }
324
325
    /**
326
     * {@inheritdoc}
327
     */
328
    public function setServices(array $services = [])
329
    {
330
        $this->services = $services;
331
    }
332
333
    /**
334
     * {@inheritdoc}
335
     */
336 11
    public function getEdNote()
337
    {
338 11
        return $this->edNote;
339
    }
340
341
    /**
342
     * {@inheritdoc}
343
     */
344
    public function setEdNote($edNote)
345
    {
346
        $this->edNote = $edNote;
347
    }
348
349
    /**
350
     * {@inheritdoc}
351
     */
352 11
    public function getGenre()
353
    {
354 11
        return $this->genre;
355
    }
356
357
    /**
358
     * {@inheritdoc}
359
     */
360
    public function setGenre($genre)
361
    {
362
        $this->genre = $genre;
363
    }
364
365
    /**
366
     * @return string
367
     */
368 11
    public function getDescription()
369
    {
370 11
        return $this->description;
371
    }
372
373
    /**
374
     * @param string $description
375
     */
376
    public function setDescription($description)
377
    {
378
        $this->description = $description;
379
    }
380
381
    /**
382
     * {@inheritdoc}
383
     */
384 11
    public function getMetadata()
385
    {
386
        return [
387 11
            'subject' => $this->getSubjects(),
388 11
            'urgency' => $this->getUrgency(),
389 11
            'priority' => $this->getPriority(),
390 11
            'located' => $this->getLocated(),
391 11
            'place' => $this->getPlaces(),
392 11
            'service' => $this->getServices(),
393 11
            'type' => $this->getType(),
394 11
            'byline' => $this->getByline(),
395 11
            'guid' => $this->getGuid(),
396 11
            'edNote' => $this->getEdNote(),
397 11
            'genre' => $this->getGenre(),
398 11
            'language' => $this->getLanguage(),
399
        ];
400
    }
401
402
    /**
403
     * {@inheritdoc}
404
     */
405 11
    public function getKeywords(): array
406
    {
407 11
        return $this->keywords;
408
    }
409
410
    /**
411
     * {@inheritdoc}
412
     */
413
    public function setKeywords(array $keywords)
414
    {
415
        $this->keywords = $keywords;
416
    }
417
}
418