Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/storage/lisk/LiskDAO.php
| Show First 20 Lines • Show All 1,631 Lines • ▼ Show 20 Lines | if ($serialization) { | ||||
| if ($deserialize) { | if ($deserialize) { | ||||
| $data[$col] = unserialize($data[$col]); | $data[$col] = unserialize($data[$col]); | ||||
| } else { | } else { | ||||
| $data[$col] = serialize($data[$col]); | $data[$col] = serialize($data[$col]); | ||||
| } | } | ||||
| break; | break; | ||||
| case self::SERIALIZATION_JSON: | case self::SERIALIZATION_JSON: | ||||
| if ($deserialize) { | if ($deserialize) { | ||||
| $data[$col] = json_decode($data[$col], true); | $data[$col] = phutil_json_decode($data[$col]); | ||||
| } else { | } else { | ||||
| $data[$col] = json_encode($data[$col]); | $data[$col] = json_encode($data[$col]); | ||||
| } | } | ||||
| break; | break; | ||||
| default: | default: | ||||
| throw new Exception("Unknown serialization format '{$format}'."); | throw new Exception("Unknown serialization format '{$format}'."); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 282 Lines • Show Last 20 Lines | |||||