Given attribute exchange arguments, populate this FetchRequest.
433 {
437 }
438
440
441 foreach ($ax_args as $key => $value) {
442 if (strpos($key, 'type.') === 0) {
443 $alias = substr($key, 5);
444 $type_uri = $value;
445
446 $alias = $aliases->addAlias($type_uri, $alias);
447
448 if ($alias === null) {
450 sprintf("Could not add alias %s for URI %s",
451 $alias, $type_uri)
452 );
453 }
454
456 if ($count_s) {
458 if (($count === false) &&
460 $count = $count_s;
461 }
462 } else {
463 $count = 1;
464 }
465
466 if ($count === false) {
468 sprintf("Integer value expected for %s, got %s",
469 'count.' . $alias, $count_s));
470 }
471
473 false, $alias);
474
476 return $attrinfo;
477 }
478
479 $this->
add($attrinfo);
480 }
481 }
482
485
486 foreach ($required as $type_uri) {
487 $attrib = $this->requested_attributes[$type_uri];
489 }
490
493
494 $all_type_uris = array_merge($required, $if_available);
495
496 foreach ($aliases->iterNamespaceURIs() as $type_uri) {
497 if (!in_array($type_uri, $all_type_uris)) {
499 sprintf('Type URI %s was in the request but not ' .
500 'present in "required" or "if_available"',
501 $type_uri));
502
503 }
504 }
505
507
508 return true;
const Auth_OpenID_AX_UNLIMITED_VALUES
Auth_OpenID_AX_toTypeURIs($namespace_map, $alias_list_s)
Given a namespace mapping and a string containing a comma-separated list of namespace aliases,...
$attrib
Regular expression to match HTML/XML attribute pairs within a tag.
static make($type_uri, $count=1, $required=false, $alias=null)
Construct an attribute information object.
add($attribute)
Add an attribute to this attribute exchange request.
_checkMode($ax_args)
Return Auth_OpenID_AX_Error if the mode in the attribute exchange arguments does not match what is ex...
static arrayGet($arr, $key, $fallback=null)
Convenience function for getting array values.
static intval($value)
Replacement (wrapper) for PHP's intval() because it's broken.