1 | <?php |
||
10 | class Album implements IMusicServiceEndpoint |
||
11 | { |
||
12 | const DATA_SOURCE = 'spotify'; |
||
13 | |||
14 | /** |
||
15 | * @var SpotifyService |
||
16 | */ |
||
17 | protected $parent; |
||
18 | |||
19 | public function __construct(SpotifyService $service) |
||
23 | |||
24 | /** |
||
25 | * @param $apiService |
||
26 | * |
||
27 | * @return mixed |
||
28 | */ |
||
29 | public function setParent($apiService) |
||
35 | |||
36 | /** |
||
37 | * Transform single item to model |
||
38 | * |
||
39 | * @param $raw |
||
40 | * |
||
41 | * @return BaseModel |
||
42 | */ |
||
43 | public function transformSingle($raw) |
||
56 | |||
57 | /** |
||
58 | * @param $raw |
||
59 | * |
||
60 | * @return ArrayCollection |
||
61 | * @throws \Exception |
||
62 | */ |
||
63 | public function transformCollection($raw) |
||
76 | |||
77 | /** |
||
78 | * Transform to models |
||
79 | * |
||
80 | * @param $raw |
||
81 | * |
||
82 | * @return ArrayCollection |
||
83 | */ |
||
84 | public function transform($raw) |
||
88 | |||
89 | /** |
||
90 | * @return mixed |
||
91 | */ |
||
92 | public function getParent() |
||
96 | |||
97 | /** |
||
98 | * @param $arguments |
||
99 | * |
||
100 | * @return mixed |
||
101 | */ |
||
102 | public function get($arguments) |
||
106 | |||
107 | /** |
||
108 | * @param $arguments |
||
109 | * |
||
110 | * @return mixed |
||
111 | */ |
||
112 | public function getComplete($arguments) |
||
116 | |||
117 | /** |
||
118 | * @param $id |
||
119 | * |
||
120 | * @return mixed |
||
121 | */ |
||
122 | public function getById($id) |
||
126 | |||
127 | /** |
||
128 | * @param $name |
||
129 | * |
||
130 | * @return mixed |
||
131 | */ |
||
132 | public function getByName($name) |
||
136 | |||
137 | /** |
||
138 | * @param $guid |
||
139 | * |
||
140 | * @return mixed |
||
141 | */ |
||
142 | public function getByGuid($guid) |
||
146 | } |