src/thinkextend/Transform.php
public static function encode($content, $type, array $config = [])
    {
        self::init($type);
        return self::$handler[$type]->encode($content, $config);
    }
public static function encode($content, $type, array $config = [])
    {
        self::init($type);
        return self::$handler[$type]->encode($content, $config);
    }
编码内容
@static
@access public
@param  mixed  $content 要编码的数据
@param  string $type    数据类型
@param  array  $config  XML配置参数，JSON格式生成无此参数
@return string          编码后的数据