aboutsummaryrefslogtreecommitdiff
path: root/view/schedule-json.php
diff options
context:
space:
mode:
authorMaZderMind2015-03-31 17:20:10 +0200
committerMaZderMind2015-03-31 17:20:10 +0200
commitf48084e1d68429235a5655a92b463cc5099be646 (patch)
treeb471e4b0be426f2d14f07a9f94a045bd62ae5ecd /view/schedule-json.php
parentd4d30ce1c3c0e941efeb41ab4f47ddcb55c6a5c0 (diff)
Rename program -> schedule
Diffstat (limited to 'view/schedule-json.php')
-rw-r--r--view/schedule-json.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/view/schedule-json.php b/view/schedule-json.php
new file mode 100644
index 0000000..739b71b
--- /dev/null
+++ b/view/schedule-json.php
@@ -0,0 +1,8 @@
+<?php
+
+$schedule = new Schedule();
+if(!$schedule->isEnabled())
+ throw new NotFoundException('Schedule is disabled');
+
+header('Content-Type: application/json');
+echo json_encode($schedule->getSchedule());