Retrieves RDF namespaces.
Invokes hook_rdf_namespaces() and collects RDF namespaces from modules that implement it.
function rdf_get_namespaces() {
$namespaces = array();
// In order to resolve duplicate namespaces by using the earliest defined
// namespace, do not use module_invoke_all().
foreach (module_implements('rdf_namespaces') as $module) {
$function = $module . '_rdf_namespaces';
if (function_exists($function)) {
$namespaces = NestedArray::mergeDeep($function(), $namespaces);
}
}
return $namespaces;
}