<?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($glsfG = null) { goto A4DDW; yMVlp: return $this; goto I61RJ; A4DDW: if (null == $glsfG) { return $this->getVariable('scope'); } goto HKpxT; HKpxT: $this->addVariables(array('scope' => $glsfG)); goto yMVlp; I61RJ: } public function unserializeValue($hsART, AbstractField $UdGHQ) { goto qwteo; Spejo: if (empty($hsART['name'])) { $hsART['name'] = null; } goto Mcwom; hvlcI: if (empty($hsART['driver'])) { $hsART['driver'] = null; } goto Spejo; OoIdU: return $hsART; goto dyEBH; Mcwom: if (empty($hsART['path'])) { $hsART['path'] = null; } goto OoIdU; qwteo: $hsART = json_decode($hsART, true); goto hvlcI; dyEBH: } public function serializeValue($hsART, $KHcR0) { return json_encode($hsART, JSON_UNESCAPED_UNICODE); } public function prepareInput($hsART, $KHcR0) { return json_decode($hsART, true); } public static function register() { FieldManager::extend('videoStream', VideoStreamField::class); } }