Serialize this object into arguments in the attribute exchange namespace.
811 {
813
814 $zero_value_types = array();
815
816 if ($request !== null) {
817
818
819
820
821
822 foreach ($this->data as $type_uri => $unused) {
823 if (!$request->contains($type_uri)) {
825 sprintf("Response attribute not present in request: %s",
826 $type_uri)
827 );
828 }
829 }
830
831 foreach ($request->iterAttrs() as $attr_info) {
832
833
834 if ($attr_info->alias === null) {
835 $aliases->add($attr_info->type_uri);
836 } else {
837 $alias = $aliases->addAlias($attr_info->type_uri,
838 $attr_info->alias);
839
840 if ($alias === null) {
842 sprintf("Could not add alias %s for URI %s",
843 $attr_info->alias, $attr_info->type_uri)
844 );
845 }
846 }
847
848 if (array_key_exists($attr_info->type_uri, $this->data)) {
849 $values = $this->data[$attr_info->type_uri];
850 } else {
851 $values = array();
852 $zero_value_types[] = $attr_info;
853 }
854
856 ($attr_info->count <
count($values))) {
858 sprintf("More than the number of requested values " .
859 "were specified for %s",
860 $attr_info->type_uri)
861 );
862 }
863 }
864 }
865
867
868
869
871
872
873
874 foreach ($zero_value_types as $attr_info) {
875 $alias = $aliases->getAlias($attr_info->type_uri);
876 $kv_args['type.' . $alias] = $attr_info->type_uri;
877 $kv_args['count.' . $alias] = '0';
878 }
879
880 $update_url = null;
881 if ($request) {
882 $update_url = $request->update_url;
883 } else {
884 $update_url = $this->update_url;
885 }
886
887 if ($update_url) {
888 $ax_args['update_url'] = $update_url;
889 }
890
892
893 return $ax_args;
const Auth_OpenID_AX_UNLIMITED_VALUES
_getExtensionKVArgs($aliases)
Get the extension arguments for the key/value pairs contained in this message.
count($type_uri)
Get the number of responses for a particular attribute in this fetch_response message.
_newArgs()
Return a set of attribute exchange arguments containing the basic information that must be in every a...
static update(&$dest, &$src)