mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-23 11:58:41 +08:00
27 lines
568 B
PHP
27 lines
568 B
PHP
<?php
|
|
/**
|
|
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
|
|
* @license https://opensource.org/licenses/GPL-2.0
|
|
* @link https://www.koogua.com
|
|
*/
|
|
|
|
namespace App\Library\Cache\Frontend;
|
|
|
|
class Json extends \Phalcon\Cache\Frontend\Json
|
|
{
|
|
|
|
/**
|
|
* Serializes data before storing them
|
|
*
|
|
* @param mixed $data
|
|
* @return string
|
|
*/
|
|
public function beforeStore($data)
|
|
{
|
|
$options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION;
|
|
|
|
return json_encode($data, $options);
|
|
}
|
|
|
|
}
|