mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-30 21:15:34 +08:00
33 lines
767 B
PHP
33 lines
767 B
PHP
<?php
|
||
/**
|
||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||
* See LICENSE file for license details.
|
||
*/
|
||
abstract class erpapi_tbo2o_response_abstract
|
||
{
|
||
protected $__channelObj;
|
||
|
||
public $__apilog;
|
||
|
||
/**
|
||
* 初始化
|
||
* @param erpapi_channel_abstract $channel channel
|
||
* @return mixed 返回值
|
||
*/
|
||
public function init(erpapi_channel_abstract $channel)
|
||
{
|
||
$this->__channelObj = $channel;
|
||
|
||
return $this;
|
||
}
|
||
|
||
//xml字符串转数组
|
||
function xmlToArray($xml){
|
||
libxml_disable_entity_loader(true);
|
||
$xmlstring = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);
|
||
$arr = json_decode(json_encode($xmlstring),true);
|
||
return $arr;
|
||
}
|
||
|
||
}
|