當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。