forked from friendica/php-json-ld
Handle @type blank node IRIs.
This commit is contained in:
parent
a1f83aaba3
commit
160c1b379a
|
@ -2354,8 +2354,8 @@ class JsonLdProcessor {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy keywords
|
// copy non-@type keywords
|
||||||
if(self::_isKeyword($prop)) {
|
if($prop !== '@type' && self::_isKeyword($prop)) {
|
||||||
$subject->{$prop} = $objects;
|
$subject->{$prop} = $objects;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -2381,6 +2381,10 @@ class JsonLdProcessor {
|
||||||
$this->_flatten($subjects, $o->{'@list'}, $namer, $name, $l);
|
$this->_flatten($subjects, $o->{'@list'}, $namer, $name, $l);
|
||||||
$o = (object)array('@list' => (array)$l);
|
$o = (object)array('@list' => (array)$l);
|
||||||
}
|
}
|
||||||
|
// special-handle @type blank nodes
|
||||||
|
else if($prop === '@type' && strpos($o, '_:') === 0) {
|
||||||
|
$o = $namer->getName($o);
|
||||||
|
}
|
||||||
|
|
||||||
// add non-subject
|
// add non-subject
|
||||||
self::addValue($subject, $prop, $o, true);
|
self::addValue($subject, $prop, $o, true);
|
||||||
|
|
Loading…
Reference in a new issue