PHP Class Thenbsp\Wechat\Bridge\Serializer

显示文件 Open project: thenbsp/wechat Class Usage Examples

Public Methods

Method Description
isJSON ( $data ) check is json string
isXML ( $data ) check is xml string
jsonDecode ( $data, array $context = [] ) json decode
jsonEncode ( $data, array $context = [] ) json encode
parse ( $string ) xml/json to array
xmlDecode ( $data, array $context = [] ) xml decode
xmlEncode ( $data, array $context = [] ) xml encode

Method Details

isJSON() public static method

check is json string
public static isJSON ( $data )

isXML() public static method

check is xml string
public static isXML ( $data )

jsonDecode() public static method

json decode
public static jsonDecode ( $data, array $context = [] )
$context array

jsonEncode() public static method

json encode
public static jsonEncode ( $data, array $context = [] )
$context array

parse() public static method

xml/json to array
public static parse ( $string )

xmlDecode() public static method

xml decode
public static xmlDecode ( $data, array $context = [] )
$context array

xmlEncode() public static method

xml encode
public static xmlEncode ( $data, array $context = [] )
$context array