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

OfferBook::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 OfferBook
16
 *
17
 * @author Denis Golubovskiy <[email protected]>
18
 */
19
class OfferBook 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 int
53
     */
54
    private $volume;
55
56
    /**
57
     * @var int
58
     */
59
    private $part;
60
61
    /**
62
     * @var string
63
     */
64
    private $language;
65
66
    /**
67
     * @var string
68
     */
69
    private $binding;
70
71
    /**
72
     * @var int
73
     */
74
    private $pageExtent;
75
76
    /**
77
     * @var string
78
     */
79
    private $tableOfContents;
80
81
    /**
82
     * @return array
83
     */
84
    public function toArray()
85
    {
86
        return array_merge($this->getHeaderOptions(), [
87
            'author' => $this->getAuthor(),
88
            'name' => $this->getName(),
89
            'publisher' => $this->getPublisher(),
90
            'series' => $this->getSeries(),
91
            'year' => $this->getYear(),
92
            'ISBN' => $this->getISBN(),
93
            'volume' => $this->getVolume(),
94
            'part' => $this->getPart(),
95
            'language' => $this->getLanguage(),
96
            'binding' => $this->getBinding(),
97
            'page_extent' => $this->getPageExtent(),
98
            'table_of_contents' => $this->getTableOfContents(),
99
        ], $this->getFooterOptions());
100
    }
101
102
    /**
103
     * @return string
104
     */
105
    public function getType()
106
    {
107
        return 'book';
108
    }
109
110
    /**
111
     * @return string
112
     */
113
    public function getAuthor()
114
    {
115
        return $this->author;
116
    }
117
118
    /**
119
     * @param string $author
120
     * @return $this
121
     */
122
    public function setAuthor($author)
123
    {
124
        $this->author = $author;
125
126
        return $this;
127
    }
128
129
    /**
130
     * @return string
131
     */
132
    public function getName()
133
    {
134
        return $this->name;
135
    }
136
137
    /**
138
     * @param string $name
139
     * @return $this
140
     */
141
    public function setName($name)
142
    {
143
        $this->name = $name;
144
145
        return $this;
146
    }
147
148
    /**
149
     * @return string
150
     */
151
    public function getPublisher()
152
    {
153
        return $this->publisher;
154
    }
155
156
    /**
157
     * @param string $publisher
158
     * @return $this
159
     */
160
    public function setPublisher($publisher)
161
    {
162
        $this->publisher = $publisher;
163
164
        return $this;
165
    }
166
167
    /**
168
     * @return string
169
     */
170
    public function getSeries()
171
    {
172
        return $this->series;
173
    }
174
175
    /**
176
     * @param string $series
177
     * @return $this
178
     */
179
    public function setSeries($series)
180
    {
181
        $this->series = $series;
182
183
        return $this;
184
    }
185
186
    /**
187
     * @return int
188
     */
189
    public function getYear()
190
    {
191
        return $this->year;
192
    }
193
194
    /**
195
     * @param int $year
196
     * @return $this
197
     */
198
    public function setYear($year)
199
    {
200
        $this->year = $year;
201
202
        return $this;
203
    }
204
205
    /**
206
     * @return string
207
     */
208
    public function getISBN()
209
    {
210
        return $this->ISBN;
211
    }
212
213
    /**
214
     * @param string $ISBN
215
     * @return $this
216
     */
217
    public function setISBN($ISBN)
218
    {
219
        $this->ISBN = $ISBN;
220
221
        return $this;
222
    }
223
224
    /**
225
     * @return int
226
     */
227
    public function getVolume()
228
    {
229
        return $this->volume;
230
    }
231
232
    /**
233
     * @param int $volume
234
     * @return $this
235
     */
236
    public function setVolume($volume)
237
    {
238
        $this->volume = $volume;
239
240
        return $this;
241
    }
242
243
    /**
244
     * @return int
245
     */
246
    public function getPart()
247
    {
248
        return $this->part;
249
    }
250
251
    /**
252
     * @param int $part
253
     * @return $this
254
     */
255
    public function setPart($part)
256
    {
257
        $this->part = $part;
258
259
        return $this;
260
    }
261
262
    /**
263
     * @return string
264
     */
265
    public function getLanguage()
266
    {
267
        return $this->language;
268
    }
269
270
    /**
271
     * @param string $language
272
     * @return $this
273
     */
274
    public function setLanguage($language)
275
    {
276
        $this->language = $language;
277
278
        return $this;
279
    }
280
281
    /**
282
     * @return string
283
     */
284
    public function getBinding()
285
    {
286
        return $this->binding;
287
    }
288
289
    /**
290
     * @param string $binding
291
     * @return $this
292
     */
293
    public function setBinding($binding)
294
    {
295
        $this->binding = $binding;
296
297
        return $this;
298
    }
299
300
    /**
301
     * @return int
302
     */
303
    public function getPageExtent()
304
    {
305
        return $this->pageExtent;
306
    }
307
308
    /**
309
     * @param int $pageExtent
310
     * @return $this
311
     */
312
    public function setPageExtent($pageExtent)
313
    {
314
        $this->pageExtent = $pageExtent;
315
316
        return $this;
317
    }
318
319
    /**
320
     * @return string
321
     */
322
    public function getTableOfContents()
323
    {
324
        return $this->tableOfContents;
325
    }
326
327
    /**
328
     * @param string $tableOfContents
329
     * @return $this
330
     */
331
    public function setTableOfContents($tableOfContents)
332
    {
333
        $this->tableOfContents = $tableOfContents;
334
335
        return $this;
336
    }
337
}
338