Auth_OpenID_AX_StoreRequest
extends Auth_OpenID_AX_KeyValueMessage
in package
A store request attribute exchange message representation.
Table of Contents
- $mode : mixed
- $ns_alias : mixed
- $ns_uri : mixed
- ns_uri: The namespace to which to add the arguments for this extension
- $data : array<string|int, mixed>
- _checkMode() : Auth_OpenID_AX_Error|bool
- Return Auth_OpenID_AX_Error if the mode in the attribute exchange arguments does not match what is expected for this class; true otherwise.
- _getExtensionKpublicgs() : array<string|int, mixed>
- Get the extension arguments for the key/value pairs contained in this message.
- _newArgs() : mixed
- Return a set of attribute exchange arguments containing the basic information that must be in every attribute exchange message.
- addValue() : mixed
- 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.
- count() : mixed
- Get the number of responses for a particular attribute in this fetch_response message.
- get() : Auth_OpenID_AX_Error|array<string|int, mixed>
- Get the list of values for this attribute in the fetch_response.
- getExtensionArgs() : array<string|int, mixed>|null
- getSingle() : Auth_OpenID_AX_Error|mixed
- 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.
- parseExtensionArgs() : Auth_OpenID_AX_Error|bool
- Parse attribute exchange key/value arguments into this object.
- setValues() : mixed
- Set the values for the given attribute type. This replaces any values that have already been set for this attribute.
- toMessage() : null
- Add the arguments from this extension to the provided message.
Properties
$mode
public
mixed
$mode
= 'store_request'
$ns_alias
public
mixed
$ns_alias
= \null
$ns_uri
ns_uri: The namespace to which to add the arguments for this extension
public
mixed
$ns_uri
= \null
$data
protected
array<string|int, mixed>
$data
= []
Methods
_checkMode()
Return Auth_OpenID_AX_Error if the mode in the attribute exchange arguments does not match what is expected for this class; true otherwise.
public
_checkMode(array<string|int, mixed> $ax_args) : Auth_OpenID_AX_Error|bool
Parameters
- $ax_args : array<string|int, mixed>
Tags
Return values
Auth_OpenID_AX_Error|bool —_getExtensionKpublicgs()
Get the extension arguments for the key/value pairs contained in this message.
public
_getExtensionKpublicgs(Auth_OpenID_NamespaceMap $aliases) : array<string|int, mixed>
Parameters
- $aliases : Auth_OpenID_NamespaceMap
-
An alias mapping. Set to None if you don't care about the aliases for this request.
Tags
Return values
array<string|int, mixed> —_newArgs()
Return a set of attribute exchange arguments containing the basic information that must be in every attribute exchange message.
public
_newArgs() : mixed
Tags
Return values
mixed —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.
public
addValue(mixed $type_uri, mixed $value) : mixed
Parameters
- $type_uri : mixed
- $value : mixed
Return values
mixed —count()
Get the number of responses for a particular attribute in this fetch_response message.
public
count(string $type_uri) : mixed
Parameters
- $type_uri : string
-
The URI of the attribute
Tags
Return values
mixed —get()
Get the list of values for this attribute in the fetch_response.
public
get(string $type_uri) : Auth_OpenID_AX_Error|array<string|int, mixed>
XXX: 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 : string
-
The URI of the attribute
Return values
Auth_OpenID_AX_Error|array<string|int, mixed> —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.
getExtensionArgs()
public
getExtensionArgs([Auth_OpenID_NamespaceMap $aliases = null ]) : array<string|int, mixed>|null
Parameters
- $aliases : Auth_OpenID_NamespaceMap = null
-
The namespace aliases to use when making this store response. Leave as None to use defaults.
Return values
array<string|int, mixed>|null —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.
public
getSingle(string $type_uri[, mixed $default = null ]) : Auth_OpenID_AX_Error|mixed
Parameters
- $type_uri : string
-
The URI for the attribute
- $default : mixed = null
-
The value to return if the attribute was not sent in the fetch_response.
Return values
Auth_OpenID_AX_Error|mixed —parseExtensionArgs()
Parse attribute exchange key/value arguments into this object.
public
parseExtensionArgs(array<string|int, mixed> $ax_args) : Auth_OpenID_AX_Error|bool
Parameters
- $ax_args : array<string|int, mixed>
-
The attribute exchange fetch_response arguments, with namespacing removed.
Return values
Auth_OpenID_AX_Error|bool —setValues()
Set the values for the given attribute type. This replaces any values that have already been set for this attribute.
public
setValues(mixed $type_uri, mixed &$values) : mixed
Parameters
- $type_uri : mixed
- $values : mixed
Return values
mixed —toMessage()
Add the arguments from this extension to the provided message.
public
toMessage(Auth_OpenID_Message $message[, Auth_OpenID_Request $request = null ]) : null
Returns the message with the extension arguments added.
Parameters
- $message : Auth_OpenID_Message
- $request : Auth_OpenID_Request = null