<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Provider\VideoStream; use ModStart\Field\AbstractField; use ModStart\Support\Manager\FieldManager; class VideoStreamField extends AbstractField { const SCOPE_ADMIN = 'admin'; const SCOPE_MEMBER = 'member'; protected $view = 'module::Vendor.View.field.videoStream'; protected $value = array('driver' => null, 'name' => null, 'path' => null); protected function setup() { parent::setup(); $this->addVariables(array('scope' => self::SCOPE_ADMIN)); } public function scope($QG152 = null) { goto tLDEq; tLDEq: if (null == $QG152) { return $this->getVariable('scope'); } goto J2WYb; bhCdH: return $this; goto Oul3V; J2WYb: $this->addVariables(array('scope' => $QG152)); goto bhCdH; Oul3V: } public function unserializeValue($qQcPQ, AbstractField $Wvq57) { goto Ysk8Q; pyBNF: if (empty($qQcPQ['path'])) { $qQcPQ['path'] = null; } goto r3Kv9; Ysk8Q: $qQcPQ = json_decode($qQcPQ, true); goto zIyN_; Qpqeu: if (empty($qQcPQ['name'])) { $qQcPQ['name'] = null; } goto pyBNF; zIyN_: if (empty($qQcPQ['driver'])) { $qQcPQ['driver'] = null; } goto Qpqeu; r3Kv9: return $qQcPQ; goto wd8nm; wd8nm: } public function serializeValue($qQcPQ, $cKa9W) { return json_encode($qQcPQ, JSON_UNESCAPED_UNICODE); } public function prepareInput($qQcPQ, $cKa9W) { return json_decode($qQcPQ, true); } public static function register() { FieldManager::extend('videoStream', VideoStreamField::class); } }