forked from friendica/php-json-ld
Simplify expand IRI.
This commit is contained in:
parent
c765930a43
commit
7034bb713e
|
@ -4625,7 +4625,10 @@ class JsonLdProcessor {
|
|||
|
||||
// do not expand blank nodes (prefix of '_') or already-absolute
|
||||
// IRIs (suffix of '//')
|
||||
if($prefix !== '_' && strpos($suffix, '//') !== 0) {
|
||||
if($prefix === '_' || strpos($suffix, '//') === 0) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
// prefix dependency not defined, define it
|
||||
if($local_ctx !== null && property_exists($local_ctx, $prefix)) {
|
||||
$this->_createTermDefinition(
|
||||
|
@ -4639,7 +4642,6 @@ class JsonLdProcessor {
|
|||
return $mapping->{'@id'} . $suffix;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// already absolute IRI
|
||||
return $value;
|
||||
|
|
Loading…
Reference in a new issue