[ class tree: OpenID ] [ index: OpenID ] [ all elements ]

Class: Auth_OpenID_AX_KeyValueMessage

Source Location: /zp-extensions/federated_logon/Auth/OpenID/AX.php

Class Auth_OpenID_AX_KeyValueMessage

Class Overview

An abstract class that implements a message that has attribute keys and values. It contains the common code between fetch_response and store_request.

Located in /zp-extensions/federated_logon/Auth/OpenID/AX.php [line 541]

Auth_OpenID_Extension
   |
   --Auth_OpenID_AX_Message
      |
      --Auth_OpenID_AX_KeyValueMessage

Methods

[ Top ]
Descendants
Child Class Description
Auth_OpenID_AX_FetchResponse A fetch_response attribute exchange message.
Auth_OpenID_AX_StoreRequest A store request attribute exchange message representation.

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Auth_OpenID_AX_Message

Auth_OpenID_AX_Message::$mode
Auth_OpenID_AX_Message::$ns_alias
Auth_OpenID_AX_Message::$ns_uri

Inherited From Auth_OpenID_Extension

Auth_OpenID_Extension::getExtensionArgs()
Get the string arguments that should be added to an OpenID message for this extension.
Auth_OpenID_Extension::toMessage()
Add the arguments from this extension to the provided message.

[ Top ]
Method Summary
Auth_OpenID_AX_KeyValueMessage   Auth_OpenID_AX_KeyValueMessage()  
null   addValue()   Add a single value for the given attribute type to the message. If there are already values specified for this type, this value will be sent in addition to the values already specified.
int   count()   Get the number of responses for a particular attribute in this fetch_response message.
$values   get()   Get the list of values for this attribute in the fetch_response.
$value   getSingle()   Get a single value for an attribute. If no value was sent for this attribute, use the supplied default. If there is more than one value for this attribute, this method will fail.
Auth_OpenID_AX_Error   parseExtensionArgs()   Parse attribute exchange key/value arguments into this object.
void   setValues()   Set the values for the given attribute type. This replaces any values that have already been set for this attribute.

[ Top ]
Methods
Constructor Auth_OpenID_AX_KeyValueMessage  [line 543]

  Auth_OpenID_AX_KeyValueMessage Auth_OpenID_AX_KeyValueMessage( )



[ Top ]
addValue  [line 559]

  null addValue( type_uri: $type_uri, value: $value  )

Add a single value for the given attribute type to the message. If there are already values specified for this type, this value will be sent in addition to the values already specified.

Parameters:
type_uri:   $type_uri:  The URI for the attribute
value:   $value:  The value to add to the response to the relying party for this attribute


[ Top ]
count  [line 775]

  int count( type_uri: $type_uri  )

Get the number of responses for a particular attribute in this fetch_response message.

Parameters:
type_uri:   $type_uri:  The URI of the attribute

API Tags:
Return:  The number of values sent for this attribute. If the attribute was not sent in the response, returns Auth_OpenID_AX_Error.


[ Top ]
get  [line 753]

  $values get( type_uri: $type_uri  )

Get the list of values for this attribute in the fetch_response.

what to do if the values are not present? default parameter? this is funny because it's always supposed to return a list, so the default may break that, though it's provided by the user's code, so it might be okay. If no default is supplied, should the return be None or []?

Parameters:
type_uri:   $type_uri:  The URI of the attribute

API Tags:
Return:  The list of values for this attribute in the response. May be an empty list. If the attribute was not sent in the response, returns Auth_OpenID_AX_Error.


[ Top ]
getSingle  [line 722]

  $value getSingle( type_uri: $type_uri, [default: $default = null]  )

Get a single value for an attribute. If no value was sent for this attribute, use the supplied default. If there is more than one value for this attribute, this method will fail.

Parameters:
type_uri:   $type_uri:  The URI for the attribute
default:   $default:  The value to return if the attribute was not sent in the fetch_response.

API Tags:
Return:  Auth_OpenID_AX_Error on failure or the value of the attribute in the fetch_response message, or the default supplied


[ Top ]
parseExtensionArgs  [line 621]

  Auth_OpenID_AX_Error parseExtensionArgs( ax_args: $ax_args  )

Parse attribute exchange key/value arguments into this object.

Parameters:
ax_args:   $ax_args:  The attribute exchange fetch_response arguments, with namespacing removed.

API Tags:
Return:  or true


Redefined in descendants as:

[ Top ]
setValues  [line 576]

  void setValues( type_uri: $type_uri, values: &$values  )

Set the values for the given attribute type. This replaces any values that have already been set for this attribute.

Parameters:
type_uri:   $type_uri:  The URI for the attribute
values:   &$values:  A list of values to send for this attribute.


[ Top ]

Documentation generated on Tue, 20 Dec 2011 16:06:37 +0100 by phpDocumentor 1.4.3