ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 is the PHP OpenID library by JanRain, Inc.
 

Functions

 Auth_Yadis_getNSMap ()
 
 Auth_Yadis_array_scramble ($arr)
 @access private More...
 
 Auth_Yadis_getXRDExpiration ($xrd_element, $default=null)
 

Variables

const SERVICES_YADIS_MATCH_ALL 101
 Require the XPath implementation. More...
 
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. More...
 
const SERVICES_YADIS_MAX_PRIORITY pow(2, 30)
 The priority value used for service elements with no priority specified. More...
 
const Auth_Yadis_XMLNS_XRD_2_0 'xri://$xrd*($v*2.0)'
 XRD XML namespace. More...
 
const Auth_Yadis_XMLNS_XRDS 'xri://$xrds'
 XRDS XML namespace. More...
 

Function Documentation

◆ Auth_Yadis_array_scramble()

Auth_Yadis_array_scramble (   $arr)

@access private

Definition at line 58 of file XRDS.php.

59{
60 $result = array();
61
62 while (count($arr)) {
63 $index = array_rand($arr, 1);
64 $result[] = $arr[$index];
65 unset($arr[$index]);
66 }
67
68 return $result;
69}
$result

References $result.

Referenced by Auth_Yadis_Service\getURIs().

+ Here is the caller graph for this function:

◆ Auth_Yadis_getNSMap()

Auth_Yadis_getNSMap ( )

Definition at line 49 of file XRDS.php.

50{
51 return array('xrds' => Auth_Yadis_XMLNS_XRDS,
53}
const Auth_Yadis_XMLNS_XRDS
XRDS XML namespace.
Definition: XRDS.php:47
const Auth_Yadis_XMLNS_XRD_2_0
XRD XML namespace.
Definition: XRDS.php:42

References Auth_Yadis_XMLNS_XRD_2_0, and Auth_Yadis_XMLNS_XRDS.

Referenced by Auth_Yadis_XRDS\parseXRDS().

+ Here is the caller graph for this function:

◆ Auth_Yadis_getXRDExpiration()

Auth_Yadis_getXRDExpiration (   $xrd_element,
  $default = null 
)

Definition at line 214 of file XRDS.php.

215{
216 $expires_element = $xrd_element->$parser->evalXPath('/xrd:Expires');
217 if ($expires_element === null) {
218 return $default;
219 } else {
220 $expires_string = $expires_element->text;
221
222 // Will raise ValueError if the string is not the expected
223 // format
224 $t = strptime($expires_string, "%Y-%m-%dT%H:%M:%SZ");
225
226 if ($t === false) {
227 return false;
228 }
229
230 // [int $hour [, int $minute [, int $second [,
231 // int $month [, int $day [, int $year ]]]]]]
232 return mktime($t['tm_hour'], $t['tm_min'], $t['tm_sec'],
233 $t['tm_mon'], $t['tm_day'], $t['tm_year']);
234 }
235}

References $t.

Variable Documentation

◆ Auth_Yadis_XMLNS_XRD_2_0

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().

◆ Auth_Yadis_XMLNS_XRDS

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().

◆ SERVICES_YADIS_MATCH_ALL

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().

◆ SERVICES_YADIS_MATCH_ANY

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().

◆ SERVICES_YADIS_MAX_PRIORITY

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().