summaryrefslogtreecommitdiff
path: root/lib/location.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-11-19 12:00:25 -0500
committerCraig Andrews <candrews@integralblue.com>2009-11-19 12:00:25 -0500
commit4463768baed036b487d473a60b30f0c314ee1673 (patch)
tree5c617bf209239e36929117beda261778815756f9 /lib/location.php
parentad0b9a7115dd0681b003f350bebcd6b6e39ea8b2 (diff)
tobyink's location RDF patch
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;
+ }
}