Auth_OpenID_AX_FetchResponse
extends Auth_OpenID_AX_KeyValueMessage
in package
A fetch_response attribute exchange message.
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>
- $update_url : string
- __construct() : 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.
- fromSuccessResponse() : Auth_OpenID_AX_FetchResponse|null
- Construct a FetchResponse object from an OpenID library SuccessResponse object.
- get() : Auth_OpenID_AX_Error|array<string|int, mixed>
- Get the list of values for this attribute in the fetch_response.
- getExtensionArgs() : Auth_OpenID_AX_Error|array<string|int, mixed>|null
- Serialize this object into arguments in the attribute exchange namespace
- 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
= 'fetch_response'
$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
= []
$update_url
private
string
$update_url
= ''
Methods
__construct()
public
__construct([mixed $update_url = null ]) : mixed
Parameters
- $update_url : mixed = null
Return values
mixed —_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 —fromSuccessResponse()
Construct a FetchResponse object from an OpenID library SuccessResponse object.
public
static fromSuccessResponse(Auth_OpenID_SuccessResponse $success_response[, bool $signed = true ]) : Auth_OpenID_AX_FetchResponse|null
Parameters
- $success_response : Auth_OpenID_SuccessResponse
-
A successful id_res response object
- $signed : bool = true
-
Whether non-signed args should be processsed. If True (the default), only signed arguments will be processsed.
Return values
Auth_OpenID_AX_FetchResponse|null —A FetchResponse containing the data from the OpenID message
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()
Serialize this object into arguments in the attribute exchange namespace
public
getExtensionArgs([Auth_OpenID_AX_FetchRequest|null $request = null ]) : Auth_OpenID_AX_Error|array<string|int, mixed>|null
Parameters
- $request : Auth_OpenID_AX_FetchRequest|null = null
Return values
Auth_OpenID_AX_Error|array<string|int, mixed>|null —$args The dictionary of unqualified attribute exchange arguments that represent this fetch_response, or Auth_OpenID_AX_Error on error.
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>
Return values
Auth_OpenID_AX_Error|bool —Auth_OpenID_AX_Error on failure or true on success.
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