Completed
Push — master ( b73efb...175f05 )
by Bukashk0zzz
03:39
created

OfferAudiobook::setYear()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Bukashk0zzzYmlGenerator
5
 *
6
 * (c) Denis Golubovskiy <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Bukashk0zzz\YmlGenerator\Model\Offer;
13
14
/**
15
 * Class OfferAudiobook
16
 *
17
 * @author Denis Golubovskiy <[email protected]>
18
 */
19
class OfferAudiobook extends AbstractOffer
20
{
21
    /**
22
     * @var string
23
     */
24
    private $author;
25
26
    /**
27
     * @var string
28
     */
29
    private $name;
30
31
    /**
32
     * @var string
33
     */
34
    private $publisher;
35
36
    /**
37
     * @var string
38
     */
39
    private $series;
40
41
    /**
42
     * @var int
43
     */
44
    private $year;
45
46
    /**
47
     * @var string
48
     */
49
    private $ISBN;
50
51
    /**
52
     * @var string
53
     */
54
    private $performedBy;
55
56
    /**
57
     * @var string
58
     */
59
    private $performanceType;
60
61
    /**
62
     * @var int
63
     */
64
    private $volume;
65
66
    /**
67
     * @var int
68
     */
69
    private $part;
70
71
    /**
72
     * @var string
73
     */
74
    private $language;
75
76
    /**
77
     * @var string
78
     */
79
    private $format;
80
81
    /**
82
     * @var string
83
     */
84
    private $storage;
85
86
    /**
87
     * @var string
88
     */
89
    private $recordingLength;
90
91
    /**
92
     * @var string
93
     */
94
    private $tableOfContents;
95
96
    /**
97
     * @return array
98
     */
99
    public function toArray()
100
    {
101
        return array_merge($this->getHeaderOptions(), [
102
            'author' => $this->getAuthor(),
103
            'name' => $this->getName(),
104
            'publisher' => $this->getPublisher(),
105
            'series' => $this->getSeries(),
106
            'year' => $this->getYear(),
107
            'ISBN' => $this->getISBN(),
108
            'volume' => $this->getVolume(),
109
            'part' => $this->getPart(),
110
            'language' => $this->getLanguage(),
111
            'table_of_contents' => $this->getTableOfContents(),
112
            'performed_by' => $this->getPerformedBy(),
113
            'performance_type' => $this->getPerformanceType(),
114
            'storage' => $this->getStorage(),
115
            'format' => $this->getFormat(),
116
            'recording_length' => $this->getRecordingLength(),
117
        ], $this->getFooterOptions());
118
    }
119
120
    /**
121
     * @return string
122
     */
123
    public function getType()
124
    {
125
        return 'audiobook';
126
    }
127
128
    /**
129
     * @return string
130
     */
131
    public function getAuthor()
132
    {
133
        return $this->author;
134
    }
135
136
    /**
137
     * @param string $author
138
     * @return OfferAudiobook
139
     */
140
    public function setAuthor($author)
141
    {
142
        $this->author = $author;
143
144
        return $this;
145
    }
146
147
    /**
148
     * @return string
149
     */
150
    public function getName()
151
    {
152
        return $this->name;
153
    }
154
155
    /**
156
     * @param string $name
157
     * @return $this
158
     */
159
    public function setName($name)
160
    {
161
        $this->name = $name;
162
163
        return $this;
164
    }
165
166
    /**
167
     * @return string
168
     */
169
    public function getPublisher()
170
    {
171
        return $this->publisher;
172
    }
173
174
    /**
175
     * @param string $publisher
176
     * @return $this
177
     */
178
    public function setPublisher($publisher)
179
    {
180
        $this->publisher = $publisher;
181
182
        return $this;
183
    }
184
185
    /**
186
     * @return string
187
     */
188
    public function getSeries()
189
    {
190
        return $this->series;
191
    }
192
193
    /**
194
     * @param string $series
195
     * @return $this
196
     */
197
    public function setSeries($series)
198
    {
199
        $this->series = $series;
200
201
        return $this;
202
    }
203
204
    /**
205
     * @return int
206
     */
207
    public function getYear()
208
    {
209
        return $this->year;
210
    }
211
212
    /**
213
     * @param int $year
214
     * @return $this
215
     */
216
    public function setYear($year)
217
    {
218
        $this->year = $year;
219
220
        return $this;
221
    }
222
223
    /**
224
     * @return string
225
     */
226
    public function getISBN()
227
    {
228
        return $this->ISBN;
229
    }
230
231
    /**
232
     * @param string $ISBN
233
     * @return $this
234
     */
235
    public function setISBN($ISBN)
236
    {
237
        $this->ISBN = $ISBN;
238
239
        return $this;
240
    }
241
242
    /**
243
     * @return string
244
     */
245
    public function getPerformedBy()
246
    {
247
        return $this->performedBy;
248
    }
249
250
    /**
251
     * @param string $performedBy
252
     * @return $this
253
     */
254
    public function setPerformedBy($performedBy)
255
    {
256
        $this->performedBy = $performedBy;
257
258
        return $this;
259
    }
260
261
    /**
262
     * @return string
263
     */
264
    public function getPerformanceType()
265
    {
266
        return $this->performanceType;
267
    }
268
269
    /**
270
     * @param string $performanceType
271
     * @return $this
272
     */
273
    public function setPerformanceType($performanceType)
274
    {
275
        $this->performanceType = $performanceType;
276
277
        return $this;
278
    }
279
280
    /**
281
     * @return int
282
     */
283
    public function getVolume()
284
    {
285
        return $this->volume;
286
    }
287
288
    /**
289
     * @param int $volume
290
     * @return $this
291
     */
292
    public function setVolume($volume)
293
    {
294
        $this->volume = $volume;
295
296
        return $this;
297
    }
298
299
    /**
300
     * @return int
301
     */
302
    public function getPart()
303
    {
304
        return $this->part;
305
    }
306
307
    /**
308
     * @param int $part
309
     * @return $this
310
     */
311
    public function setPart($part)
312
    {
313
        $this->part = $part;
314
315
        return $this;
316
    }
317
318
    /**
319
     * @return string
320
     */
321
    public function getLanguage()
322
    {
323
        return $this->language;
324
    }
325
326
    /**
327
     * @param string $language
328
     * @return $this
329
     */
330
    public function setLanguage($language)
331
    {
332
        $this->language = $language;
333
334
        return $this;
335
    }
336
337
    /**
338
     * @return string
339
     */
340
    public function getFormat()
341
    {
342
        return $this->format;
343
    }
344
345
    /**
346
     * @param string $format
347
     * @return $this
348
     */
349
    public function setFormat($format)
350
    {
351
        $this->format = $format;
352
353
        return $this;
354
    }
355
356
    /**
357
     * @return string
358
     */
359
    public function getStorage()
360
    {
361
        return $this->storage;
362
    }
363
364
    /**
365
     * @param string $storage
366
     * @return $this
367
     */
368
    public function setStorage($storage)
369
    {
370
        $this->storage = $storage;
371
372
        return $this;
373
    }
374
375
    /**
376
     * @return string
377
     */
378
    public function getRecordingLength()
379
    {
380
        return $this->recordingLength;
381
    }
382
383
    /**
384
     * @param string $recordingLength
385
     * @return $this
386
     */
387
    public function setRecordingLength($recordingLength)
388
    {
389
        $this->recordingLength = $recordingLength;
390
391
        return $this;
392
    }
393
394
    /**
395
     * @return string
396
     */
397
    public function getTableOfContents()
398
    {
399
        return $this->tableOfContents;
400
    }
401
402
    /**
403
     * @param string $tableOfContents
404
     * @return $this
405
     */
406
    public function setTableOfContents($tableOfContents)
407
    {
408
        $this->tableOfContents = $tableOfContents;
409
410
        return $this;
411
    }
412
}
413