当前位置: 首页>>代码示例>>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;未经允许,请勿转载。