<?php namespace Curl; class Decoder { /** * Decode JSON * * @access public * @param $json * @param $assoc * @param $depth * @param $options */ public static function decodeJson() { $args = func_get_args(); $response = call_user_func_array('json_decode', $args); if ($response === null) { $response = $args['0']; } return $response; } /** * Decode XML * * @access public * @param $data * @param $class_name * @param $options * @param $ns * @param $is_prefix */ public static function decodeXml() { $args = func_get_args(); $response = @call_user_func_array('simplexml_load_string', $args); if ($response === false) { $response = $args['0']; } return $response; } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
ArrayUtil.php | File | 3.54 KB | 0644 |
|
CaseInsensitiveArray.php | File | 5.55 KB | 0644 |
|
Curl.php | File | 49.86 KB | 0644 |
|
Decoder.php | File | 897 B | 0644 |
|
Encoder.php | File | 681 B | 0644 |
|
MultiCurl.php | File | 29.41 KB | 0644 |
|
StringUtil.php | File | 1.63 KB | 0644 |
|
Url.php | File | 11.39 KB | 0644 |
|