當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Auth_OpenID::httpBuildQuery方法代碼示例

本文整理匯總了PHP中Auth_OpenID::httpBuildQuery方法的典型用法代碼示例。如果您正苦於以下問題:PHP Auth_OpenID::httpBuildQuery方法的具體用法?PHP Auth_OpenID::httpBuildQuery怎麽用?PHP Auth_OpenID::httpBuildQuery使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Auth_OpenID的用法示例。


在下文中一共展示了Auth_OpenID::httpBuildQuery方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: toURLEncoded

 function toURLEncoded()
 {
     // Generate an x-www-urlencoded string
     $args = array();
     foreach ($this->toPostArgs() as $k => $v) {
         $args[] = array($k, $v);
     }
     sort($args);
     return Auth_OpenID::httpBuildQuery($args);
 }
開發者ID:BackupTheBerlios,項目名稱:oos-svn,代碼行數:10,代碼來源:Message.php

示例2: Services_Yadis_XRIAppendArgs

function Services_Yadis_XRIAppendArgs($url, $args)
{
    // Append some arguments to an HTTP query.  Yes, this is just like
    // OpenID's appendArgs, but with special seasoning for XRI
    // queries.
    if (count($args) == 0) {
        return $url;
    }
    // Non-empty array; if it is an array of arrays, use multisort;
    // otherwise use sort.
    if (array_key_exists(0, $args) && is_array($args[0])) {
        // Do nothing here.
    } else {
        $keys = array_keys($args);
        sort($keys);
        $new_args = array();
        foreach ($keys as $key) {
            $new_args[] = array($key, $args[$key]);
        }
        $args = $new_args;
    }
    // According to XRI Resolution section "QXRI query parameters":
    //
    // "If the original QXRI had a null query component (only a
    //  leading question mark), or a query component consisting of
    //  only question marks, one additional leading question mark MUST
    //  be added when adding any XRI resolution parameters."
    if (strpos(rtrim($url, '?'), '?') !== false) {
        $sep = '&';
    } else {
        $sep = '?';
    }
    return $url . $sep . Auth_OpenID::httpBuildQuery($args);
}
開發者ID:JJYing,項目名稱:Anyway-Website,代碼行數:34,代碼來源:XRI.php

示例3: appendArgs

 /**
  * "Appends" query arguments onto a URL.  The URL may or may not
  * already have arguments (following a question mark).
  *
  * @access private
  * @param string $url A URL, which may or may not already have
  * arguments.
  * @param array $args Either an array key/value pairs or an array of
  * arrays, each of which holding two values: a key and a value,
  * sequentially.  If $args is an ordinary key/value array, the
  * parameters will be added to the URL in sorted alphabetical order;
  * if $args is an array of arrays, their order will be preserved.
  * @return string $url The original URL with the new parameters added.
  *
  */
 static function appendArgs($url, $args)
 {
     if (count($args) == 0) {
         return $url;
     }
     // Non-empty array; if it is an array of arrays, use
     // multisort; otherwise use sort.
     if (array_key_exists(0, $args) && is_array($args[0])) {
         // Do nothing here.
     } else {
         $keys = array_keys($args);
         sort($keys);
         $new_args = array();
         foreach ($keys as $key) {
             $new_args[] = array($key, $args[$key]);
         }
         $args = $new_args;
     }
     $sep = '?';
     if (strpos($url, '?') !== false) {
         $sep = '&';
     }
     return $url . $sep . Auth_OpenID::httpBuildQuery($args);
 }
開發者ID:rb26,項目名稱:zenphoto,代碼行數:39,代碼來源:OpenID.php


注:本文中的Auth_OpenID::httpBuildQuery方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。