<?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($EdQjV) { goto QrY5B; QrY5B: $Uvh5r = array('driver' => $this->remoteType, 'domain' => $this->domain()); goto yGvSd; yGvSd: $this->repository->updateData($EdQjV['id'], $Uvh5r); goto J9iD2; J9iD2: return array_merge($EdQjV, $Uvh5r); goto UZbY5; UZbY5: } public function getDriverFullPath($tGXA6) { goto IlReS; IlReS: $tGXA6 = parent::getDriverFullPath($tGXA6); goto DGNhS; vjdfF: return $this->domain() . $tGXA6; goto lA2m9; DGNhS: if (PathUtil::isPublicNetPath($tGXA6)) { return $tGXA6; } goto vjdfF; lA2m9: } public function getDriverFullPathInternal($tGXA6) { goto UswSU; UzsKp: return $this->domainInternal() . $tGXA6; goto o0NeA; UswSU: $tGXA6 = parent::getDriverFullPath($tGXA6); goto C3lcI; C3lcI: if (PathUtil::isPublicNetPath($tGXA6)) { return $tGXA6; } goto UzsKp; o0NeA: } }