static function fromOpenIDRequest($request, $cls='Auth_OpenID_SRegRequest')
    {

        $obj = call_user_func_array(array($cls, 'build'),
                 array(null, null, null, Auth_OpenID_SREG_NS_URI, $cls));

        // Since we're going to mess with namespace URI mapping, don't
        // mutate the object that was passed in.
        $m = $request->message;

        $obj->ns_uri = $obj->_getSRegNS($m);
        $args = $m->getArgs($obj->ns_uri);

        if ($args === null || Auth_OpenID::isFailure($args)) {
            return null;
        }

        $obj->parseExtensionArgs($args);

        return $obj;
    }
static function fromOpenIDRequest($request, $cls='Auth_OpenID_SRegRequest')
    {

        $obj = call_user_func_array(array($cls, 'build'),
                 array(null, null, null, Auth_OpenID_SREG_NS_URI, $cls));

        // Since we're going to mess with namespace URI mapping, don't
        // mutate the object that was passed in.
        $m = $request->message;

        $obj->ns_uri = $obj->_getSRegNS($m);
        $args = $m->getArgs($obj->ns_uri);

        if ($args === null || Auth_OpenID::isFailure($args)) {
            return null;
        }

        $obj->parseExtensionArgs($args);

        return $obj;
    }
static function fromOpenIDRequest ( $ request , $ cls = 'Auth_OpenID_SRegRequest' ) { $ obj = call_user_func_array ( array ( $ cls , 'build' ) , array ( null , null , null , Auth_OpenID_SREG_NS_URI , $ cls ) ) ; // Since we're going to mess with namespace URI mapping, don't // mutate the object that was passed in. $ m = $ request -> message ; $ obj -> ns_uri = $ obj -> _getSRegNS ( $ m ) ; $ args = $ m -> getArgs ( $ obj -> ns_uri ) ; if ( $ args === null || Auth_OpenID :: isFailure ( $ args ) ) { return null ; } $ obj -> parseExtensionArgs ( $ args ) ; return $ obj ; }
Create a simple registration request that contains the fields
that were requested in the OpenID request with the given
arguments

$request: The OpenID authentication request from which to
extract an sreg request.

$cls: name of class to use when creating sreg request object.
Used for testing.

Returns the newly created simple registration request

@param Auth_OpenID_Request $request
@param string $cls
@return Auth_OpenID_SRegRequest|null
Create a simple registration request that contains the fields that were requested in the OpenID request with the given arguments