| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 4 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 10 | class XSPFPlaylist extends Playlist |
||
| 11 | { |
||
| 12 | |||
| 13 | public function __toString() |
||
| 14 | { |
||
| 15 | $playlist = new \Jalle19\xsphpf\Playlist(); |
||
| 16 | |||
| 17 | foreach ($this->_items as $item) |
||
| 18 | { |
||
| 19 | // Runtime should be in milliseconds |
||
| 20 | $track = new \Jalle19\xsphpf\Track($item->location, $item->title, $item->runtime * 1000); |
||
| 21 | |||
| 22 | if ($item->image) |
||
| 23 | $track->setImage($item->image); |
||
| 24 | |||
| 25 | $playlist->addTrack($track); |
||
| 26 | } |
||
| 27 | |||
| 28 | return $playlist->__toString(); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function getExtension() |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getMIMEType() |
||
| 39 | } |
||
| 40 | |||
| 42 |