Auth_OpenID_Message::updateArgs PHP Method

updateArgs() public method

public updateArgs ( $namespace, $updates )
    function updateArgs($namespace, $updates)
    {
        // Set multiple key/value pairs in one call
        $namespace = $this->_fixNS($namespace);
        if (Auth_OpenID::isFailure($namespace)) {
            return $namespace;
        } else {
            foreach ($updates as $k => $v) {
                $this->setArg($namespace, $k, $v);
            }
            return true;
        }
    }

Usage Example

Example #1
0
	function encodeToURL($server_url)
	{
		if (!$this->return_to) {
			return new Auth_OpenID_NoReturnToError();
		}

		// Imported from the alternate reality where these classes are
		// used in both the client and server code, so Requests are
		// Encodable too.  That's right, code imported from alternate
		// realities all for the love of you, id_res/user_setup_url.

		$q = array('mode' => $this->mode,
                   'identity' => $this->identity,
                   'claimed_id' => $this->claimed_id,
                   'return_to' => $this->return_to);

		if ($this->trust_root) {
			if ($this->message->isOpenID1()) {
				$q['trust_root'] = $this->trust_root;
			} else {
				$q['realm'] = $this->trust_root;
			}
		}

		if ($this->assoc_handle) {
			$q['assoc_handle'] = $this->assoc_handle;
		}

		$response = new Auth_OpenID_Message(
		$this->message->getOpenIDNamespace());
		$response->updateArgs(Auth_OpenID_OPENID_NS, $q);
		return $response->toURL($server_url);
	}
All Usage Examples Of Auth_OpenID_Message::updateArgs