From 4bf486955cea9e2b67531f044c6bf34a7bc9324f Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 18 Nov 2008 19:09:24 +0000 Subject: The start of the slideshow module. Mostly framework stuff, no real implementation yet --- modules/slideshow/controllers/slideshow.php | 50 +++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 modules/slideshow/controllers/slideshow.php (limited to 'modules/slideshow/controllers') diff --git a/modules/slideshow/controllers/slideshow.php b/modules/slideshow/controllers/slideshow.php new file mode 100644 index 00000000..57553227 --- /dev/null +++ b/modules/slideshow/controllers/slideshow.php @@ -0,0 +1,50 @@ +input->get("offset", 0); + $children = array(); + // @todo actually fill the array + switch ($output_format) { + case "json": + print json_encode($children); + break; + case "rss": + $view = new View("slideshow_feed.rss"); + $view->item = $parent; + $view->children = $children; + break; + default: + throw new Exception("@todo Unsupported output format: $output_format"); + } + } + + /** + * Override the get_output_format. We want to restrict the check to only $_GET and set the + * default to rss. + * @return string + */ + protected function get_output_format() { + return $this->input->get("_format", "rss"); + } +} \ No newline at end of file -- cgit v1.2.3