mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-03 14:02:47 +08:00
TP4初始版本提交
This commit is contained in:
22
Library/Think/Transform/Driver/Json.php
Normal file
22
Library/Think/Transform/Driver/Json.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | TOPThink [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011 http://topthink.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: 麦当苗儿 <zuojiazi.cn@gmail.com> <http://www.zjzit.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace Think\Transform\Driver;
|
||||
|
||||
class Json{
|
||||
public function encode($data){
|
||||
return json_encode($data);
|
||||
}
|
||||
|
||||
public function decode($data, $assoc = true){
|
||||
return json_decode($data, $assoc);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user