1
|
|
|
<?php |
2
|
|
|
/******************************************************************************* |
3
|
|
|
* This file is part of the Pbxg33k\MusicInfo package. |
4
|
|
|
* |
5
|
|
|
* For the full copyright and license information, please view the LICENSE |
6
|
|
|
* file that was distributed with this source code. |
7
|
|
|
* |
8
|
|
|
* (c) 2017 Oguzhan uysal. All rights reserved |
9
|
|
|
******************************************************************************/ |
10
|
|
|
|
11
|
|
|
namespace Pbxg33k\MusicInfo\Model; |
12
|
|
|
|
13
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
14
|
|
|
use GuzzleHttp\Psr7\Uri; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Class Track |
18
|
|
|
* |
19
|
|
|
* @package Model |
20
|
|
|
*/ |
21
|
|
|
class Track extends BaseModel |
22
|
|
|
{ |
23
|
|
|
/** |
24
|
|
|
* @var |
25
|
|
|
*/ |
26
|
|
|
protected $id; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var |
30
|
|
|
*/ |
31
|
|
|
protected $name; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var |
35
|
|
|
*/ |
36
|
|
|
protected $image; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var Uri |
40
|
|
|
*/ |
41
|
|
|
protected $uri; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var |
45
|
|
|
*/ |
46
|
|
|
protected $explicit; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var integer |
50
|
|
|
*/ |
51
|
|
|
protected $length; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @var Uri |
55
|
|
|
*/ |
56
|
|
|
protected $preview_uri; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @var ArrayCollection |
60
|
|
|
*/ |
61
|
|
|
protected $albumTrack; |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @var ArrayCollection |
65
|
|
|
*/ |
66
|
|
|
protected $trackArtists; |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @return mixed |
70
|
|
|
*/ |
71
|
3 |
|
public function getId() |
72
|
|
|
{ |
73
|
3 |
|
return $this->id; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @param mixed $id |
78
|
|
|
* |
79
|
|
|
* @return Track |
80
|
|
|
*/ |
81
|
6 |
|
public function setId($id) |
82
|
|
|
{ |
83
|
6 |
|
$this->id = $id; |
84
|
|
|
|
85
|
6 |
|
return $this; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* @return mixed |
90
|
|
|
*/ |
91
|
3 |
|
public function getName() |
92
|
|
|
{ |
93
|
3 |
|
return $this->name; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* @param mixed $name |
98
|
|
|
* |
99
|
|
|
* @return Track |
100
|
|
|
*/ |
101
|
6 |
|
public function setName($name) |
102
|
|
|
{ |
103
|
6 |
|
$this->name = $name; |
104
|
|
|
|
105
|
6 |
|
return $this; |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* @return mixed |
110
|
|
|
*/ |
111
|
3 |
|
public function getImage() |
112
|
|
|
{ |
113
|
3 |
|
return $this->image; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* @param mixed $image |
118
|
|
|
* |
119
|
|
|
* @return Track |
120
|
|
|
*/ |
121
|
1 |
|
public function setImage($image) |
122
|
|
|
{ |
123
|
1 |
|
$this->image = $image; |
124
|
|
|
|
125
|
1 |
|
return $this; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @return mixed |
130
|
|
|
*/ |
131
|
3 |
|
public function getUri() |
132
|
|
|
{ |
133
|
3 |
|
return $this->uri; |
134
|
|
|
} |
135
|
|
|
|
136
|
|
|
/** |
137
|
|
|
* @param mixed $uri |
138
|
|
|
* |
139
|
|
|
* @return Track |
140
|
|
|
*/ |
141
|
1 |
|
public function setUri(Uri $uri) |
142
|
|
|
{ |
143
|
1 |
|
$this->uri = $uri; |
144
|
|
|
|
145
|
1 |
|
return $this; |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
/** |
149
|
|
|
* @return mixed |
150
|
|
|
*/ |
151
|
1 |
|
public function getAlbumTrack() |
152
|
|
|
{ |
153
|
1 |
|
return $this->albumTrack; |
154
|
|
|
} |
155
|
|
|
|
156
|
|
|
/** |
157
|
|
|
* @param mixed $albumTrack |
158
|
|
|
* |
159
|
|
|
* @return Track |
160
|
|
|
*/ |
161
|
1 |
|
public function setAlbumTrack($albumTrack) |
162
|
|
|
{ |
163
|
1 |
|
$this->albumTrack = $albumTrack; |
164
|
|
|
|
165
|
1 |
|
return $this; |
166
|
|
|
} |
167
|
|
|
|
168
|
|
|
/** |
169
|
|
|
* @return mixed |
170
|
|
|
*/ |
171
|
1 |
|
public function getTrackArtists() |
172
|
|
|
{ |
173
|
1 |
|
return $this->trackArtists; |
174
|
|
|
} |
175
|
|
|
|
176
|
|
|
/** |
177
|
|
|
* @param mixed $trackArtists |
178
|
|
|
* |
179
|
|
|
* @return Track |
180
|
|
|
*/ |
181
|
1 |
|
public function setTrackArtists($trackArtists) |
182
|
|
|
{ |
183
|
1 |
|
$this->trackArtists = $trackArtists; |
184
|
|
|
|
185
|
1 |
|
return $this; |
186
|
|
|
} |
187
|
|
|
|
188
|
1 |
|
public function addTrackArtist(Artist $artist) |
189
|
|
|
{ |
190
|
1 |
|
$this->trackArtists->add($artist); |
191
|
|
|
|
192
|
1 |
|
return $this; |
193
|
|
|
} |
194
|
|
|
|
195
|
1 |
|
public function removeTrackArtist(Artist $artist) |
196
|
|
|
{ |
197
|
1 |
|
$this->trackArtists->removeElement($artist); |
198
|
|
|
|
199
|
1 |
|
return $this; |
200
|
|
|
} |
201
|
|
|
|
202
|
|
|
/** |
203
|
|
|
* @return mixed |
204
|
|
|
*/ |
205
|
1 |
|
public function getExplicit() |
206
|
|
|
{ |
207
|
1 |
|
return $this->explicit; |
208
|
|
|
} |
209
|
|
|
|
210
|
|
|
/** |
211
|
|
|
* @param mixed $explicit |
212
|
|
|
* |
213
|
|
|
* @return Track |
214
|
|
|
*/ |
215
|
4 |
|
public function setExplicit($explicit) |
216
|
|
|
{ |
217
|
4 |
|
$this->explicit = $explicit; |
218
|
|
|
|
219
|
4 |
|
return $this; |
220
|
|
|
} |
221
|
|
|
|
222
|
|
|
/** |
223
|
|
|
* @return int |
224
|
|
|
*/ |
225
|
3 |
|
public function getLength() |
226
|
|
|
{ |
227
|
3 |
|
return $this->length; |
228
|
|
|
} |
229
|
|
|
|
230
|
|
|
/** |
231
|
|
|
* @param int $length |
232
|
|
|
* |
233
|
|
|
* @return Track |
234
|
|
|
*/ |
235
|
4 |
|
public function setLength($length) |
236
|
|
|
{ |
237
|
4 |
|
$this->length = $length; |
238
|
|
|
|
239
|
4 |
|
return $this; |
240
|
|
|
} |
241
|
|
|
|
242
|
|
|
/** |
243
|
|
|
* @return Uri |
244
|
|
|
*/ |
245
|
1 |
|
public function getPreviewUri() |
246
|
|
|
{ |
247
|
1 |
|
return $this->preview_uri; |
248
|
|
|
} |
249
|
|
|
|
250
|
|
|
/** |
251
|
|
|
* @param Uri $preview_uri |
252
|
|
|
* |
253
|
|
|
* @return Track |
254
|
|
|
*/ |
255
|
4 |
|
public function setPreviewUri(Uri $preview_uri) |
256
|
|
|
{ |
257
|
4 |
|
$this->preview_uri = $preview_uri; |
258
|
|
|
|
259
|
4 |
|
return $this; |
260
|
|
|
} |
261
|
|
|
|
262
|
|
|
} |
263
|
|
|
|