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


PHP XML::toArray方法代码示例

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


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

示例1: XML

 /**
  * Process XML Response
  *
  * Process the XML response from Twitter.com
  *
  * @param string $response
  */
 function __process_xml($response)
 {
     $xml = new XML($response);
     $result = $xml->toArray();
     $xml->__killParent();
     $xml->__destruct();
     $xml = null;
     unset($xml);
     return $result;
 }
开发者ID:joux,项目名称:fraim,代码行数:17,代码来源:twitter.php

示例2: setBody

 public function setBody(\SimpleXMLElement $body)
 {
     $this->data = null;
     $parser = new XML();
     $data = $parser->toArray($body);
     if (!isset($data['@attributes']['type']) || !isset($data['@attributes']['msg'])) {
         return;
     }
     $this->data = $data;
 }
开发者ID:jarekkozak,项目名称:yii2-libs,代码行数:10,代码来源:KieResponse.php

示例3: process

 /**
  * undocumented function
  *
  * @param string $options 
  * @return void
  * @access public
  */
 function process($options = array())
 {
     $defaults = array('type' => 'redirect', 'tId' => false);
     $options = am($defaults, $options);
     if ($options['type'] == 'redirect') {
         $myXml = $this->inquiry($options['tId']);
         App::import('Core', 'Xml');
         $xml = new XML($myXml);
         $data = $xml->toArray();
         return array('order_id' => $data['PaymentService']['Reply']['OrderStatus']['orderCode'], 'url' => $data['PaymentService']['Reply']['OrderStatus']['reference']['value']);
     }
     return false;
 }
开发者ID:stripthis,项目名称:donate,代码行数:20,代码来源:bibit.php

示例4: __formatResponse

 /**
  * Format the API response into an array, given the expected response type
  * 
  * @param array Response to format
  * @param string Response type
  * @return array Array formatted API response
  */
 private function __formatResponse($response, $format)
 {
     if (in_array($format, array('xml', 'rss', 'atom'))) {
         $xml = new XML($response);
         $array = $xml->toArray(false);
         unset($xml);
         $response = $this->__fixXml($array);
         if (isset($response['bitly'])) {
             $response = array('results' => $this->__fixBitlyXml($response['bitly']['results']));
         }
     } elseif ($format === 'json') {
         $response = json_decode($response, true);
     }
     return $response;
 }
开发者ID:CakeDC,项目名称:bitly,代码行数:22,代码来源:BitlyApiBehavior.php

示例5: XMLToArray

 public static function XMLToArray($xml, $recursionDepth = 0)
 {
     XML::toArray($xml, $recursionDepth);
 }
开发者ID:Clansuite,项目名称:Clansuite,代码行数:4,代码来源:Conversion.php

示例6: XML

 function __process($response)
 {
     $xml = new XML($response);
     return $xml->toArray();
 }
开发者ID:jcalado,项目名称:planetuga,代码行数:5,代码来源:twitter.php

示例7: XML

 function __to_array($response = '')
 {
     $xml = new XML($response);
     $array = $xml->toArray();
     $xml->__killParent();
     $xml->__destruct();
     $xml = null;
     unset($xml);
     return $array;
 }
开发者ID:aniltc,项目名称:cakephp-plugin-google-analytics,代码行数:10,代码来源:google_analytics_source.php

示例8: XML

 /**
  *
  * @param string data to process
  * @return array Twitter API response
  */
 function __process($response)
 {
     $xml = new XML($response);
     $array = $xml->toArray();
     $xml->__destruct();
     $xml = null;
     unset($xml);
     return $array;
 }
开发者ID:huanjian,项目名称:mythesis,代码行数:14,代码来源:TwitterSource.php

示例9: XML

 function __process($response)
 {
     /* Note: this will fail to properly distinguish among link tags -- see
        __parse_atom above for a better alternative */
     $xml = new XML($response);
     $array = $xml->toArray();
     $xml->__killParent();
     $xml->__destruct();
     $xml = null;
     unset($xml);
     return $array;
 }
开发者ID:areisv,项目名称:cakewell,代码行数:12,代码来源:twitter.php


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