forked from friendica/php-json-ld
Ensure @language and @vocab are copied from active context.
This commit is contained in:
parent
9653a673d5
commit
232afca21d
12
jsonld.php
12
jsonld.php
|
@ -4956,6 +4956,12 @@ class JsonLdProcessor {
|
|||
$child->mappings = self::copy($active_ctx->mappings);
|
||||
$child->namer = $active_ctx->namer;
|
||||
$child->inverse = null;
|
||||
if(property_exists($active_ctx, '@language')) {
|
||||
$child->{'@language'} = $active_ctx->{'@language'};
|
||||
}
|
||||
if(property_exists($active_ctx, '@vocab')) {
|
||||
$child->{'@vocab'} = $active_ctx->{'@vocab'};
|
||||
}
|
||||
return $child;
|
||||
}
|
||||
|
||||
|
@ -4977,6 +4983,12 @@ class JsonLdProcessor {
|
|||
$rval->namer = new UniqueNamer('_:b');
|
||||
}
|
||||
$rval->inverse = $active_ctx->inverse;
|
||||
if(property_exists($active_ctx, '@language')) {
|
||||
$rval->{'@language'} = $active_ctx->{'@language'};
|
||||
}
|
||||
if(property_exists($active_ctx, '@vocab')) {
|
||||
$rval->{'@vocab'} = $active_ctx->{'@vocab'};
|
||||
}
|
||||
return $rval;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue