<?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($UaIS4 = null) { goto CB5nc; q1zAr: $this->addVariables(array('scope' => $UaIS4)); goto qGyfG; CB5nc: if (null == $UaIS4) { return $this->getVariable('scope'); } goto q1zAr; qGyfG: return $this; goto YfOsN; YfOsN: } public function unserializeValue($DiI0O, AbstractField $A02Yi) { goto tXxbb; w2wqn: if (empty($DiI0O['name'])) { $DiI0O['name'] = null; } goto X7Hh9; n6xl5: if (empty($DiI0O['driver'])) { $DiI0O['driver'] = null; } goto w2wqn; tXxbb: $DiI0O = json_decode($DiI0O, true); goto n6xl5; X7Hh9: if (empty($DiI0O['path'])) { $DiI0O['path'] = null; } goto oWj4o; oWj4o: return $DiI0O; goto q_ETD; q_ETD: } public function serializeValue($DiI0O, $r0XyP) { return json_encode($DiI0O, JSON_UNESCAPED_UNICODE); } public function prepareInput($DiI0O, $r0XyP) { return json_decode($DiI0O, true); } public static function register() { FieldManager::extend('videoStream', VideoStreamField::class); } }