mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-04 11:48:40 +00:00
add float
This commit is contained in:
parent
0fd5a91a2e
commit
221bc5b2cb
|
|
@ -278,6 +278,8 @@ class RedisCache extends ConnectionAbstract
|
||||||
{
|
{
|
||||||
if ($type === CacheValueType::_INT || $type === CacheValueType::_STRING || $type === CacheValueType::_BOOL) {
|
if ($type === CacheValueType::_INT || $type === CacheValueType::_STRING || $type === CacheValueType::_BOOL) {
|
||||||
return (string) $value;
|
return (string) $value;
|
||||||
|
} elseif ($type === CacheValueType::_FLOAT) {
|
||||||
|
return \rtrim(\rtrim(\number_format($value, 5, '.', ''), '0'), '.');
|
||||||
} elseif ($type === CacheValueType::_ARRAY) {
|
} elseif ($type === CacheValueType::_ARRAY) {
|
||||||
return (string) \json_encode($value);
|
return (string) \json_encode($value);
|
||||||
} elseif ($type === CacheValueType::_SERIALIZABLE) {
|
} elseif ($type === CacheValueType::_SERIALIZABLE) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user