You are here

public function EasyRdf_Resource::localName in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php \EasyRdf_Resource::localName()

Gets the local name of the URI of this resource

The local name is defined as the part of the URI string after the last occurrence of the '#', ':' or '/' character.

Return value

string The local name

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php, line 160

Class

EasyRdf_Resource
Class that represents an RDF resource

Code

public function localName() {
  if (preg_match("|([^#:/]+)\$|", $this->uri, $matches)) {
    return $matches[1];
  }
}