From 7124a88b7a0f09eaed04ccc601f376c55bcaafe2 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Sun, 18 Dec 2011 15:14:25 -0500 Subject: [PATCH] Remove expandSubjects option. --- jsonld.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/jsonld.php b/jsonld.php index 88ea8ec..6039f76 100644 --- a/jsonld.php +++ b/jsonld.php @@ -1477,11 +1477,10 @@ class JsonLdProcessor * @param ctx the context. * @param property the property that points to the value, NULL for none. * @param value the value to expand. - * @param expandSubjects true to expand subjects (normalize), false not to. * * @return the expanded value. */ - public function expand($ctx, $property, $value, $expandSubjects) + public function expand($ctx, $property, $value) { $rval; @@ -1504,7 +1503,7 @@ class JsonLdProcessor $rval = array(); foreach($value as $v) { - $rval[] = $this->expand($ctx, $property, $v, $expandSubjects); + $rval[] = $this->expand($ctx, $property, $v); } } else if(is_object($value)) @@ -1537,7 +1536,7 @@ class JsonLdProcessor // set object to expanded property _setProperty( $rval, _expandTerm($ctx, $key, null), - $this->expand($ctx, $key, $v, $expandSubjects)); + $this->expand($ctx, $key, $v)); } } } @@ -1589,9 +1588,8 @@ class JsonLdProcessor } } - // coerce to appropriate type, only expand subjects if requested - if($coerce !== null and ( - $property !== $keywords->{'@subject'} or $expandSubjects)) + // coerce to appropriate type (do not expand subjects) + if($coerce !== null and $property !== $keywords->{'@subject'}) { $rval = new stdClass();