summaryrefslogtreecommitdiff
path: root/UrlGenerator.class.php
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-03-13 15:25:25 +0000
committerTrygve Laugstøl <trygvis@inamo.no>2012-03-13 15:25:25 +0000
commite67fa24d3c21792b3adab3f88e2383219018b696 (patch)
treeef1ab28143ef4f1007ec37926e84ace786ed045e /UrlGenerator.class.php
downloadhttp-mq-e67fa24d3c21792b3adab3f88e2383219018b696.tar.gz
http-mq-e67fa24d3c21792b3adab3f88e2383219018b696.tar.bz2
http-mq-e67fa24d3c21792b3adab3f88e2383219018b696.tar.xz
http-mq-e67fa24d3c21792b3adab3f88e2383219018b696.zip
o Initial import.
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";
+ }
+}
+?>