当前位置: 首页>>代码示例>>PHP>>正文


PHP Braintree_Util::camelCaseToDelimiterArray方法代码示例

本文整理汇总了PHP中Braintree_Util::camelCaseToDelimiterArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Braintree_Util::camelCaseToDelimiterArray方法的具体用法?PHP Braintree_Util::camelCaseToDelimiterArray怎么用?PHP Braintree_Util::camelCaseToDelimiterArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Braintree_Util的用法示例。


在下文中一共展示了Braintree_Util::camelCaseToDelimiterArray方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: connectUrl

 public function connectUrl($params = array())
 {
     $query = Braintree_Util::camelCaseToDelimiterArray($params, '_');
     $query['client_id'] = $this->_config->getClientId();
     $url = $this->_config->baseUrl() . '/oauth/connect?' . http_build_query($query);
     return $this->signUrl($url);
 }
开发者ID:nstungxd,项目名称:F2CA5,代码行数:7,代码来源:OAuthGateway.php

示例2: connectUrl

 public function connectUrl($params = array())
 {
     $query = Braintree_Util::camelCaseToDelimiterArray($params, '_');
     $query['client_id'] = $this->_config->getClientId();
     $queryString = preg_replace('/\\%5B\\d+\\%5D/', '%5B%5D', http_build_query($query));
     $url = $this->_config->baseUrl() . '/oauth/connect?' . $queryString;
     return $this->signUrl($url);
 }
开发者ID:buga1234,项目名称:buga_segforours,代码行数:8,代码来源:OAuthGateway.php

示例3: put

 public function put($path, $params = null)
 {
     $body = http_build_query(Braintree_Util::camelCaseToDelimiterArray($params, '_'));
     $response = $this->_doRequest('PUT', $path, $body);
     $responseCode = $response['status'];
     if ($responseCode === 200 || $responseCode === 201 || $responseCode === 422 || $responseCode === 400) {
         return Braintree_Util::delimiterToCamelCaseArray(json_decode($response['body'], true), '_');
     } else {
         Braintree_Util::throwStatusCodeException($responseCode);
     }
 }
开发者ID:Flesh192,项目名称:magento,代码行数:11,代码来源:HttpOAuth.php

示例4: arrayToXml

 /**
  * arrays passed to this method should have a single root element
  * with an array as its value
  * @param array $aData the array of data
  * @return var XML string
  */
 public static function arrayToXml($aData)
 {
     $aData = Braintree_Util::camelCaseToDelimiterArray($aData, '-');
     // set up the XMLWriter
     $writer = new XMLWriter();
     $writer->openMemory();
     $writer->setIndent(true);
     $writer->setIndentString(' ');
     $writer->startDocument('1.0', 'UTF-8');
     // get the root element name
     $aKeys = array_keys($aData);
     $rootElementName = $aKeys[0];
     // open the root element
     $writer->startElement($rootElementName);
     // create the body
     self::_createElementsFromArray($writer, $aData[$rootElementName], $rootElementName);
     // close the root element and document
     $writer->endElement();
     $writer->endDocument();
     // send the output as string
     return $writer->outputMemory();
 }
开发者ID:nstungxd,项目名称:F2CA5,代码行数:28,代码来源:Generator.php


注:本文中的Braintree_Util::camelCaseToDelimiterArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。