]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/location.php
Misses this file to merge. I like the comments.
[quix0rs-gnu-social.git] / lib / location.php
index bbfc15a36d3929e817df561a05a59683593961b3..191550d6d6ca53e213f4a13f3b6b8bd2fc763a65 100644 (file)
@@ -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;
+    }
 }