You are here

public static function EasyRdf_Namespace::prefixOfUri in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Namespace.php \EasyRdf_Namespace::prefixOfUri()

Return the prefix namespace that a URI belongs to.

Parameters

string $uri A full URI (eg 'http://xmlns.com/foaf/0.1/name'):

Return value

string The prefix namespace that it is a part of(eg 'foaf')

1 call to EasyRdf_Namespace::prefixOfUri()
EasyRdf_Resource::prefix in vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php
Get a the prefix of the namespace that this resource is part of

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Namespace.php, line 358

Class

EasyRdf_Namespace
A namespace registry and manipulation class.

Code

public static function prefixOfUri($uri) {
  if ($parts = self::splitUri($uri)) {
    return $parts[0];
  }
}