-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.php
More file actions
51 lines (37 loc) · 912 Bytes
/
Copy pathindex.php
File metadata and controls
51 lines (37 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
require 'Slim/Slim.php';
require 'iTunesController.php';
$app = new Slim(array(
'log.enable' => true,
'log.path' => './logs',
'log.level' => 4,
));
$app->get('/', function(){
echo 'Click <a href="home.html"> here to get started</a>';
});
$app->get('/song', function(){
$song = new Song();
echo $song->getSongInfo();
});
$app->get('/playpause', function(){
$controller = new iTunesController();
$controller->playpause();
});
$app->get('/next', function(){
$controller = new iTunesController();
$controller->next();
});
$app->get('/prev', function(){
$controller = new iTunesController();
$controller->prev();
});
$app->get('/getallplaylists', function(){
$controller = new iTunesController();
echo $controller->getAllPlayLists();
});
$app->get('/getcurrentplaylist', function(){
$playlist = new PlayList();
echo $playlist->getSongs();
});
$app->run();
?>