改进response助手函数 改进Response类的header方法 支持批量设置

This commit is contained in:
thinkphp
2016-06-07 11:52:23 +08:00
parent 5988f36102
commit ae2824ced1
3 changed files with 12 additions and 10 deletions

View File

@@ -321,12 +321,10 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
$value = json_encode($value, JSON_FORCE_OBJECT);
}
break;
case 'array':
$value = (array) $value;
case 'json':
$value = json_encode($value, JSON_UNESCAPED_UNICODE);
break;
}
return $value;