jalle19 / xsphpf
用于创建XSPF播放列表的库
1.0.0
2017-10-28 12:19 UTC
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: ^4.8
This package is auto-updated.
Last update: 2024-09-13 00:35:48 UTC
README
创建XSPF播放列表的最小库。
需求
- PHP >= 5.4
安装
composer require jalle19/xsphpf
用法
<?php // Create a playlist $playlist = new Jalle19\xsphpf\Playlist(); // Create a track $track = new Jalle19\xsphpf\Track('http://example.com/song_1.mp3'); // Define some optional attributes for the track $track->setTitle('Some fancy title') ->setDuration(300) ->setImage('http://example.com/image.jpeg'); // Add the track to the playlist $playlist->addTrack($track); // Serialize the playlist to XML $xml = $playlist->__toString();
许可证
GPL-3