diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-19 00:35:32 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-19 00:35:32 -0800 |
commit | 2c0b0aaebca6ec1149585853d7d849d50bea4184 (patch) | |
tree | 569754bfabd40e721de4d91abb8c2fbee93d9ad8 /modules/rest/helpers/rest.php | |
parent | c23bf312c41102efc2af320a8f63a5180fe84eea (diff) |
Add rest::url() for convenience.
Diffstat (limited to 'modules/rest/helpers/rest.php')
-rw-r--r-- | modules/rest/helpers/rest.php | 10 |
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"); + } } |