ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
AX.php File Reference

Go to the source code of this file.

Data Structures

class  Auth_OpenID_AX
class  Auth_OpenID_AX_Error
class  Auth_OpenID_AX_Message
class  Auth_OpenID_AX_AttrInfo
class  Auth_OpenID_AX_FetchRequest
class  Auth_OpenID_AX_KeyValueMessage
class  Auth_OpenID_AX_FetchResponse
class  Auth_OpenID_AX_StoreRequest
class  Auth_OpenID_AX_StoreResponse

Namespaces

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

Functions

 Auth_OpenID_AX_checkAlias ($alias)
 Check an alias for invalid characters; raise AXError if any are found.
 Auth_OpenID_AX_toTypeURIs ($namespace_map, $alias_list_s)
 Given a namespace mapping and a string containing a comma-separated list of namespace aliases, return a list of type URIs that correspond to those aliases.

Variables

const Auth_OpenID_AX_NS_URI = 'http://openid.net/srv/ax/1.0'
 Require utility classes and functions for the consumer.
const Auth_OpenID_AX_UNLIMITED_VALUES = 'unlimited'
const Auth_OpenID_AX_MINIMUM_SUPPORTED_ALIAS_LENGTH = 32

Function Documentation

Auth_OpenID_AX_checkAlias (   $alias)

Check an alias for invalid characters; raise AXError if any are found.

Return None if the alias is valid.

Definition at line 50 of file AX.php.

{
if (strpos($alias, ',') !== false) {
return new Auth_OpenID_AX_Error(sprintf(
"Alias %s must not contain comma", $alias));
}
if (strpos($alias, '.') !== false) {
return new Auth_OpenID_AX_Error(sprintf(
"Alias %s must not contain period", $alias));
}
return true;
Auth_OpenID_AX_toTypeURIs (   $namespace_map,
  $alias_list_s 
)

Given a namespace mapping and a string containing a comma-separated list of namespace aliases, return a list of type URIs that correspond to those aliases.

Parameters
$namespace_mapThe mapping from namespace URI to alias
$alias_list_sThe string containing the comma-separated list of aliases. May also be None for convenience.
Returns
$seq The list of namespace URIs that corresponds to the supplied list of aliases. If the string was zero-length or None, an empty list will be returned.

return null If an alias is present in the list of aliases but is not present in the namespace map.

Definition at line 237 of file AX.php.

{
$uris = array();
if ($alias_list_s) {
foreach (explode(',', $alias_list_s) as $alias) {
$type_uri = $namespace_map->getNamespaceURI($alias);
if ($type_uri === null) {
// raise KeyError(
// 'No type is defined for attribute name %r' % (alias,))
sprintf('No type is defined for attribute name %s',
$alias)
);
} else {
$uris[] = $type_uri;
}
}
}
return $uris;

Variable Documentation

const Auth_OpenID_AX_MINIMUM_SUPPORTED_ALIAS_LENGTH = 32

Definition at line 25 of file AX.php.

const Auth_OpenID_AX_NS_URI = 'http://openid.net/srv/ax/1.0'

Require utility classes and functions for the consumer.

Definition at line 17 of file AX.php.

const Auth_OpenID_AX_UNLIMITED_VALUES = 'unlimited'

Definition at line 21 of file AX.php.