summaryrefslogtreecommitdiff
path: root/lib/location.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/location.php')
-rw-r--r--lib/location.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/location.php b/lib/location.php
index bbfc15a36..191550d6d 100644
--- a/lib/location.php
+++ b/lib/location.php
@@ -52,6 +52,7 @@ class Location
public $location_id;
public $location_ns;
private $_url;
+ private $_rdfurl;
var $names = array();
@@ -185,4 +186,27 @@ class Location
return $url;
}
+
+ /**
+ * Get an URL for this location, suitable for embedding in RDF
+ *
+ * @return string URL for this location or NULL
+ */
+
+ function getRdfURL()
+ {
+ // Keep one cached
+
+ if (is_string($this->_rdfurl)) {
+ return $this->_rdfurl;
+ }
+
+ $url = null;
+
+ Event::handle('LocationRdfUrl', array($this, &$url));
+
+ $this->_rdfurl = $url;
+
+ return $url;
+ }
}