ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
XRDS.php File Reference

Go to the source code of this file.

Data Structures

class  Auth_Yadis_Service
class  Auth_Yadis_XRDS

Namespaces

namespace  OpenID
 This module contains code for dealing with associations between consumers and servers.

Functions

 Auth_Yadis_getNSMap ()
 Auth_Yadis_array_scramble ($arr)
 private
 Auth_Yadis_getXRDExpiration ($xrd_element, $default=null)

Variables

const SERVICES_YADIS_MATCH_ALL = 101
 Require the XPath implementation.
const SERVICES_YADIS_MATCH_ANY = 102
 This match mode means a given service must match ANY filters (at least one) passed to the Auth_Yadis_XRDS::services() call.
const SERVICES_YADIS_MAX_PRIORITY = pow(2, 30)
 The priority value used for service elements with no priority specified.
const Auth_Yadis_XMLNS_XRD_2_0 = 'xri://$xrd*($v*2.0)'
 XRD XML namespace.
const Auth_Yadis_XMLNS_XRDS = 'xri://$xrds'
 XRDS XML namespace.

Function Documentation

Auth_Yadis_array_scramble (   $arr)

private

Definition at line 58 of file XRDS.php.

References $result.

Referenced by Auth_Yadis_Service\getURIs().

{
$result = array();
while (count($arr)) {
$index = array_rand($arr, 1);
$result[] = $arr[$index];
unset($arr[$index]);
}
return $result;
}

+ Here is the caller graph for this function:

Auth_Yadis_getNSMap ( )

Definition at line 49 of file XRDS.php.

References Auth_Yadis_XMLNS_XRD_2_0, and Auth_Yadis_XMLNS_XRDS.

Referenced by Auth_Yadis_XRDS\parseXRDS().

{
return array('xrds' => Auth_Yadis_XMLNS_XRDS,
}

+ Here is the caller graph for this function:

Auth_Yadis_getXRDExpiration (   $xrd_element,
  $default = null 
)

Definition at line 214 of file XRDS.php.

References $t.

{
$expires_element = $xrd_element->$parser->evalXPath('/xrd:Expires');
if ($expires_element === null) {
return $default;
} else {
$expires_string = $expires_element->text;
// Will raise ValueError if the string is not the expected
// format
$t = strptime($expires_string, "%Y-%m-%dT%H:%M:%SZ");
if ($t === false) {
return false;
}
// [int $hour [, int $minute [, int $second [,
// int $month [, int $day [, int $year ]]]]]]
return mktime($t['tm_hour'], $t['tm_min'], $t['tm_sec'],
$t['tm_mon'], $t['tm_day'], $t['tm_year']);
}
}

Variable Documentation

const Auth_Yadis_XMLNS_XRD_2_0 = 'xri://$xrd*($v*2.0)'

XRD XML namespace.

Definition at line 42 of file XRDS.php.

Referenced by Auth_OpenID_findOPLocalIdentifier(), Auth_Yadis_getNSMap(), and Auth_Yadis_XRDS\parseXRDS().

const Auth_Yadis_XMLNS_XRDS = 'xri://$xrds'

XRDS XML namespace.

Definition at line 47 of file XRDS.php.

Referenced by Auth_Yadis_getNSMap(), and Auth_Yadis_XRDS\parseXRDS().

const SERVICES_YADIS_MATCH_ALL = 101

Require the XPath implementation.

This match mode means a given service must match ALL filters passed to the Auth_Yadis_XRDS::services() call.

Definition at line 25 of file XRDS.php.

Referenced by Auth_Yadis_XRDS\services().

const SERVICES_YADIS_MATCH_ANY = 102

This match mode means a given service must match ANY filters (at least one) passed to the Auth_Yadis_XRDS::services() call.

Definition at line 31 of file XRDS.php.

Referenced by Auth_Yadis_XRDS\services().

const SERVICES_YADIS_MAX_PRIORITY = pow(2, 30)

The priority value used for service elements with no priority specified.

Definition at line 37 of file XRDS.php.

Referenced by Auth_Yadis_XRDS\_parse(), and Auth_Yadis_XRDS\services().