Register a new namespace.
string $prefix The namespace prefix (eg 'foaf'):
string $long The namespace URI (eg 'http://xmlns.com/foaf/0.1/'):
public static function set($prefix, $long) {
if (!is_string($prefix) or $prefix === null or $prefix === '') {
throw new InvalidArgumentException("\$prefix should be a string and cannot be null or empty");
}
if (preg_match('/\\W/', $prefix)) {
throw new InvalidArgumentException("\$prefix should only contain alpha-numeric characters");
}
if (!is_string($long) or $long === null or $long === '') {
throw new InvalidArgumentException("\$long should be a string and cannot be null or empty");
}
$prefix = strtolower($prefix);
self::$namespaces[$prefix] = $long;
}