Move container var outside of loop.

This commit is contained in:
Dave Longley 2013-02-11 16:24:26 -05:00
parent 7692f6f087
commit 6e2b78c722

View file

@ -4601,6 +4601,14 @@ class JsonLdProcessor {
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
$iris = $mapping->{'@id'};
$iris = self::arrayify($iris);
@ -4611,14 +4619,6 @@ class JsonLdProcessor {
}
$container_map = $inverse->{$iri};
// add term selection where it applies
if(property_exists($mapping, '@container')) {
$container = $mapping->{'@container'};
}
else {
$container = '@none';
}
// add new entry
if(!property_exists($container_map, $container)) {
$container_map->{$container} = (object)array(