From 6e2b78c7226d2c4c2e137135981d8a2aee90368c Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Mon, 11 Feb 2013 16:24:26 -0500 Subject: [PATCH] Move container var outside of loop. --- jsonld.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/jsonld.php b/jsonld.php index a3320d3..cdab68a 100644 --- a/jsonld.php +++ b/jsonld.php @@ -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(