Source code for file /openid/Services/Yadis/XRIRes.php
Documentation is available at XRIRes.php
require_once 'Services/Yadis/XRDS.php';
require_once 'Services/Yadis/XRI.php';
$this->fetcher =
& $fetcher;
$this->proxy_url =
$proxy_url;
$this->proxy_url =
$DEFAULT_PROXY;
function queryURL($xri, $service_type =
null)
// trim off the xri:// prefix
$hxri =
$this->proxy_url .
$qxri;
'_xrd_r' =>
'application/xrds+xml'
$args['_xrd_t'] =
$service_type;
// Don't perform service endpoint selection.
$args['_xrd_r'] .=
';sep=false';
function query($xri, $service_types, $filters =
array())
foreach ($service_types as $service_type) {
$url =
$this->queryURL($xri, $service_type);
$response =
$this->fetcher->get($url);
if ($response->status !=
200) {
if ($canonicalID ===
false) {
$some_services =
$xrds->services($filters);
// * If we do get hits for multiple service_types, we're
// almost certainly going to have duplicated service
// entries and broken priority ordering.
return array($canonicalID, $services);