28 lines
623 B
PHP
28 lines
623 B
PHP
<?php
|
|
namespace ktk\MusicServe;
|
|
|
|
class Playlist {
|
|
static private $playlist;
|
|
static public function onInit() {
|
|
if (!MusicServe::getData('playlist')) {
|
|
MusicServe::storeData('playlist', array());
|
|
}
|
|
}
|
|
static public function onProcess() {
|
|
}
|
|
static public function onRender() {
|
|
echo ' <div id="ktk_MusicServe_Playlist">',PHP_EOL;
|
|
foreach (MusicServe::getData('playlist') as $file) {
|
|
echo $file.'<br />';
|
|
}
|
|
echo ' </div>',PHP_EOL;
|
|
}
|
|
static public function onClose() {
|
|
}
|
|
|
|
static public function addFile($file) {
|
|
MusicServe::getData('playlist')[] = $file;
|
|
}
|
|
}
|
|
?>
|