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