<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Data; use ModStart\Core\Util\PathUtil; abstract class AbstractRemoteDataStorage extends AbstractDataStorage { protected $remoteType = ''; public function driverName() { return $this->remoteType; } public function domain() { return modstart_config()->getWithEnv($this->remoteType . '_Domain'); } public function domainInternal() { return modstart_config()->getWithEnv($this->remoteType . '_DomainInternal', modstart_config()->getWithEnv($this->remoteType . '_Domain')); } public function updateDriverDomain($CnWtd) { goto pzYSP; Jmwxd: $this->repository->updateData($CnWtd['id'], $CSNXd); goto GgKWP; GgKWP: return array_merge($CnWtd, $CSNXd); goto a6y3x; pzYSP: $CSNXd = array('driver' => $this->remoteType, 'domain' => $this->domain()); goto Jmwxd; a6y3x: } public function getDriverFullPath($VF_G6) { goto N8xWA; o1Icf: return $this->domain() . $VF_G6; goto HJ4lJ; N8xWA: $VF_G6 = parent::getDriverFullPath($VF_G6); goto fYq03; fYq03: if (PathUtil::isPublicNetPath($VF_G6)) { return $VF_G6; } goto o1Icf; HJ4lJ: } public function getDriverFullPathInternal($VF_G6) { goto hzGlD; hzGlD: $VF_G6 = parent::getDriverFullPath($VF_G6); goto ZhEV1; rhRFb: return $this->domainInternal() . $VF_G6; goto NfKcN; ZhEV1: if (PathUtil::isPublicNetPath($VF_G6)) { return $VF_G6; } goto rhRFb; NfKcN: } }