修复xml返回的bug

This commit is contained in:
luofei614
2015-12-09 20:26:40 -05:00
parent e970a2974a
commit c72aa08aff
2 changed files with 2 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ class Transform
private static function init($type) private static function init($type)
{ {
if (!isset(self::$handler[$type])) { if (!isset(self::$handler[$type])) {
$class = '\\think\\transform\\driver\\' . strtolower($type); $class = '\\org\\transform\\driver\\' . strtolower($type);
self::$handler[$type] = new $class(); self::$handler[$type] = new $class();
} }
} }

View File

@@ -72,7 +72,7 @@ class Xml
* @param string $id 数字索引key转换为的属性名 * @param string $id 数字索引key转换为的属性名
* @return string * @return string
*/ */
public static function data2xml(SimpleXMLElement $xml, $data, $item = 'item', $id = 'id') public static function data2xml(\SimpleXMLElement $xml, $data, $item = 'item', $id = 'id')
{ {
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
//指定默认的数字key //指定默认的数字key