forked from friendica/php-json-ld
Use call_user_func.
This commit is contained in:
parent
01f0f1440d
commit
fdd5ef987f
|
@ -208,7 +208,7 @@ function jsonld_get_url($url) {
|
||||||
$document_loader = $jsonld_default_document_loader;
|
$document_loader = $jsonld_default_document_loader;
|
||||||
}
|
}
|
||||||
|
|
||||||
$remote_doc = $document_loader($url);
|
$remote_doc = call_user_func($document_loader, $url);
|
||||||
if($remote_doc) {
|
if($remote_doc) {
|
||||||
return $remote_doc->document;
|
return $remote_doc->document;
|
||||||
}
|
}
|
||||||
|
@ -1083,7 +1083,7 @@ class JsonLdProcessor {
|
||||||
else {
|
else {
|
||||||
$callable = $jsonld_rdf_parsers->{$options['format']};
|
$callable = $jsonld_rdf_parsers->{$options['format']};
|
||||||
}
|
}
|
||||||
$dataset = $callable($dataset);
|
$dataset = call_user_func($callable, $dataset);
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert from RDF
|
// convert from RDF
|
||||||
|
@ -2213,7 +2213,7 @@ class JsonLdProcessor {
|
||||||
sort($keys);
|
sort($keys);
|
||||||
foreach($keys as $key) {
|
foreach($keys as $key) {
|
||||||
$val = $value->{$key};
|
$val = $value->{$key};
|
||||||
$val = self::arrayify($val);
|
$val = JsonLdProcessor::arrayify($val);
|
||||||
$val = $this->_expand(
|
$val = $this->_expand(
|
||||||
$active_ctx, $active_property, $val, $options, false);
|
$active_ctx, $active_property, $val, $options, false);
|
||||||
foreach($val as $item) {
|
foreach($val as $item) {
|
||||||
|
@ -4929,7 +4929,7 @@ class JsonLdProcessor {
|
||||||
$_cycles->{$url} = true;
|
$_cycles->{$url} = true;
|
||||||
|
|
||||||
// retrieve URL
|
// retrieve URL
|
||||||
$remote_doc = $load_document($url);
|
$remote_doc = call_user_func($load_document, $url);
|
||||||
$ctx = $remote_doc->document;
|
$ctx = $remote_doc->document;
|
||||||
|
|
||||||
// parse string context as JSON
|
// parse string context as JSON
|
||||||
|
|
Loading…
Reference in a new issue