X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Flocation.php;h=191550d6d6ca53e213f4a13f3b6b8bd2fc763a65;hb=627d84a1e2db2aca5d2ce1272f6e83fb7faa8ad2;hp=bbfc15a36d3929e817df561a05a59683593961b3;hpb=61419038e5747886357964a7eb3f814761482891;p=quix0rs-gnu-social.git diff --git a/lib/location.php b/lib/location.php index bbfc15a36d..191550d6d6 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; + } }