Make default url resolver a separate function.

This commit is contained in:
Dave Longley 2012-10-29 09:57:24 -04:00
parent 7b20e349af
commit 4c76b11a67

View file

@ -171,6 +171,18 @@ function jsonld_resolve_url($url) {
return call_user_func($jsonld_default_url_resolver, $url);
}
// default JSON-LD GET implementation
return jsonld_default_resolve_url($url);
}
/**
* The default implementation to retrieve JSON-LD at the given URL.
*
* @param string $url the URL to to resolve.
*
* @return the JSON-LD.
*/
function jsonld_default_resolve_url($url) {
// default JSON-LD GET implementation
$opts = array('http' =>
array(