Auth_OpenID_SRegRequest::parseExtensionArgs PHP Метод

parseExtensionArgs() публичный Метод

This method is essentially the inverse of getExtensionArgs. This method restores the serialized simple registration request fields. If you are extracting arguments from a standard OpenID checkid_* request, you probably want to use fromOpenIDRequest, which will extract the sreg namespace and arguments from the OpenID request. This method is intended for cases where the OpenID server needs more control over how the arguments are parsed than that method provides. $args == $message->getArgs($ns_uri); $request->parseExtensionArgs($args); $args: The unqualified simple registration arguments strict: Whether requests with fields that are not defined in the simple registration specification should be tolerated (and ignored)
public parseExtensionArgs ( $args, $strict = false )
    function parseExtensionArgs($args, $strict = false)
    {
        foreach (array('required', 'optional') as $list_name) {
            $required = $list_name == 'required';
            $items = Auth_OpenID::arrayGet($args, $list_name);
            if ($items) {
                foreach (explode(',', $items) as $field_name) {
                    if (!$this->requestField($field_name, $required, $strict)) {
                        if ($strict) {
                            return false;
                        }
                    }
                }
            }
        }
        $this->policy_url = Auth_OpenID::arrayGet($args, 'policy_url');
        return true;
    }