<?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($SjN8A) { goto OFBLx; OFBLx: $yAZP9 = array('driver' => $this->remoteType, 'domain' => $this->domain()); goto Lj71d; Lj71d: $this->repository->updateData($SjN8A['id'], $yAZP9); goto Dw_MI; Dw_MI: return array_merge($SjN8A, $yAZP9); goto QwLlz; QwLlz: } public function getDriverFullPath($LclBr) { goto WmNy1; Mr_A3: if (PathUtil::isPublicNetPath($LclBr)) { return $LclBr; } goto nv4r6; WmNy1: $LclBr = parent::getDriverFullPath($LclBr); goto Mr_A3; nv4r6: return $this->domain() . $LclBr; goto HfUov; HfUov: } public function getDriverFullPathInternal($LclBr) { goto r064K; fu8JR: return $this->domainInternal() . $LclBr; goto kCsT4; r064K: $LclBr = parent::getDriverFullPath($LclBr); goto MG1UY; MG1UY: if (PathUtil::isPublicNetPath($LclBr)) { return $LclBr; } goto fu8JR; kCsT4: } }