<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Exception\BizException; class Json extends AbstractField { protected function setup() { $this->addVariables(array('editorHeight' => '200px')); } public function editorHeight($XOwtM) { $this->addVariables(array('editorHeight' => $XOwtM)); return $this; } public function unserializeValue($FT9zA, AbstractField $SQ6_6) { return @json_decode($FT9zA, true); } public function serializeValue($FT9zA, $TAWWJ) { return json_encode($FT9zA, JSON_UNESCAPED_UNICODE); } public function prepareInput($FT9zA, $TAWWJ) { goto eD5AO; eD5AO: $c8Hgd = @json_decode($FT9zA, true); goto PsuBW; PsuBW: BizException::throwsIf($this->label . ' ' . L('Json Format Error'), $FT9zA && null === $c8Hgd); goto XrFXL; XrFXL: return $c8Hgd; goto e5ogK; e5ogK: } }