summaryrefslogtreecommitdiff
path: root/UrlGenerator.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'UrlGenerator.class.php')
-rw-r--r--UrlGenerator.class.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/UrlGenerator.class.php b/UrlGenerator.class.php
new file mode 100644
index 0000000..03c5b14
--- /dev/null
+++ b/UrlGenerator.class.php
@@ -0,0 +1,25 @@
+<?php
+class UrlGenerator {
+ public $baseurl;
+
+ function __construct($baseurl) {
+ $this->baseurl = $baseurl;
+ }
+
+ function queue($queue) {
+ return $this->baseurl . "/queue/" . $queue;
+ }
+
+ function enqueue($queue) {
+ return $this->baseurl . "/enqueue/" . $queue;
+ }
+
+ function item($queue, $item) {
+ return $this->baseurl . "/item/" . $queue . "/" . $id;
+ }
+
+ function item_enclosure($queue, $id) {
+ return $this->baseurl . "/item/" . $queue . "/" . $id . "?enclosure";
+ }
+}
+?>