summaryrefslogtreecommitdiff
path: root/lib/location.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-11-19 17:35:45 +0000
committerSarven Capadisli <csarven@status.net>2009-11-19 17:35:45 +0000
commit318dd70de888513a5b0404c5eb1cdbb3c6e8e760 (patch)
tree9fbd3a33126978200ce5854ec87067935b592417 /lib/location.php
parent60391d0b96579aff2ee105ab64a89ffdb225bbdc (diff)
parentee22b2ccf9819cefba54ef38c6a57829c7d3fa73 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
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;
+ }
}