static function build($required=null, $optional=null,
                   $policy_url=null,
                   $sreg_ns_uri=Auth_OpenID_SREG_NS_URI,
                   $cls='Auth_OpenID_SRegRequest')
    {
        /** @var Auth_OpenID_SRegRequest $obj */
        $obj = new $cls();

        $obj->required = array();
        $obj->optional = array();
        $obj->policy_url = $policy_url;
        $obj->ns_uri = $sreg_ns_uri;

        if ($required) {
            if (!$obj->requestFields($required, true, true)) {
                return null;
            }
        }

        if ($optional) {
            if (!$obj->requestFields($optional, false, true)) {
                return null;
            }
        }

        return $obj;
    }
static function build($required=null, $optional=null,
                   $policy_url=null,
                   $sreg_ns_uri=Auth_OpenID_SREG_NS_URI,
                   $cls='Auth_OpenID_SRegRequest')
    {
        /** @var Auth_OpenID_SRegRequest $obj */
        $obj = new $cls();

        $obj->required = array();
        $obj->optional = array();
        $obj->policy_url = $policy_url;
        $obj->ns_uri = $sreg_ns_uri;

        if ($required) {
            if (!$obj->requestFields($required, true, true)) {
                return null;
            }
        }

        if ($optional) {
            if (!$obj->requestFields($optional, false, true)) {
                return null;
            }
        }

        return $obj;
    }
static function build ( $ required = null , $ optional = null , $ policy_url = null , $ sreg_ns_uri = Auth_OpenID_SREG_NS_URI , $ cls = 'Auth_OpenID_SRegRequest' ) { /** @var Auth_OpenID_SRegRequest $obj */ $ obj = new $ cls ( ) ; $ obj -> required = array ( ) ; $ obj -> optional = array ( ) ; $ obj -> policy_url = $ policy_url ; $ obj -> ns_uri = $ sreg_ns_uri ; if ( $ required ) { if ( ! $ obj -> requestFields ( $ required , true , true ) ) { return null ; } } if ( $ optional ) { if ( ! $ obj -> requestFields ( $ optional , false , true ) ) { return null ; } } return $ obj ; }
Initialize an empty simple registration request.

@param null $required
@param null $optional
@param null $policy_url
@param string $sreg_ns_uri
@param string $cls
@return null
Initialize an empty simple registration request .