summaryrefslogtreecommitdiff
path: root/modules/rest/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rest/helpers')
-rw-r--r--modules/rest/helpers/rest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/rest/helpers/rest.php b/modules/rest/helpers/rest.php
index 121191f2..423765bb 100644
--- a/modules/rest/helpers/rest.php
+++ b/modules/rest/helpers/rest.php
@@ -71,4 +71,14 @@ class rest_Core {
return call_user_func(array($class, "resolve"), !empty($components[2]) ? $components[2] : null);
}
+
+ /**
+ * Return an absolute url used for REST resource location.
+ * @param string module name (eg, "gallery", "tags")
+ * @param string relative path (eg "Family/Weddings.jpg")
+ * @return string complete url
+ */
+ static function url($module, $path) {
+ return url::abs_site("rest/$module/$path");
+ }
}