<?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($OTBPk) { goto Mjmk4; Mjmk4: $O9qD_ = array('driver' => $this->remoteType, 'domain' => $this->domain()); goto YOrsv; YOrsv: $this->repository->updateData($OTBPk['id'], $O9qD_); goto kaWQQ; kaWQQ: return array_merge($OTBPk, $O9qD_); goto Qhvv9; Qhvv9: } public function getDriverFullPath($S3tfG) { goto MXA3x; hy3i_: return $this->domain() . $S3tfG; goto RcSOq; MXA3x: $S3tfG = parent::getDriverFullPath($S3tfG); goto bbPOp; bbPOp: if (PathUtil::isPublicNetPath($S3tfG)) { return $S3tfG; } goto hy3i_; RcSOq: } public function getDriverFullPathInternal($S3tfG) { goto BurvF; barCc: return $this->domainInternal() . $S3tfG; goto TCiKD; ZibUf: if (PathUtil::isPublicNetPath($S3tfG)) { return $S3tfG; } goto barCc; BurvF: $S3tfG = parent::getDriverFullPath($S3tfG); goto ZibUf; TCiKD: } }