forked from friendica/php-json-ld
Move container var outside of loop.
This commit is contained in:
parent
7692f6f087
commit
6e2b78c722
1 changed files with 8 additions and 8 deletions
16
jsonld.php
16
jsonld.php
|
@ -4601,6 +4601,14 @@ class JsonLdProcessor {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// add term selection where it applies
|
||||||
|
if(property_exists($mapping, '@container')) {
|
||||||
|
$container = $mapping->{'@container'};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$container = '@none';
|
||||||
|
}
|
||||||
|
|
||||||
// iterate over every IRI in the mapping
|
// iterate over every IRI in the mapping
|
||||||
$iris = $mapping->{'@id'};
|
$iris = $mapping->{'@id'};
|
||||||
$iris = self::arrayify($iris);
|
$iris = self::arrayify($iris);
|
||||||
|
@ -4611,14 +4619,6 @@ class JsonLdProcessor {
|
||||||
}
|
}
|
||||||
$container_map = $inverse->{$iri};
|
$container_map = $inverse->{$iri};
|
||||||
|
|
||||||
// add term selection where it applies
|
|
||||||
if(property_exists($mapping, '@container')) {
|
|
||||||
$container = $mapping->{'@container'};
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$container = '@none';
|
|
||||||
}
|
|
||||||
|
|
||||||
// add new entry
|
// add new entry
|
||||||
if(!property_exists($container_map, $container)) {
|
if(!property_exists($container_map, $container)) {
|
||||||
$container_map->{$container} = (object)array(
|
$container_map->{$container} = (object)array(
|
||||||
|
|
Loading…
Add table
Reference in a new issue