<?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($IaeCl) { goto ept1t; ept1t: $bxz93 = array('driver' => $this->remoteType, 'domain' => $this->domain()); goto eLQbe; eLQbe: $this->repository->updateData($IaeCl['id'], $bxz93); goto PInPP; PInPP: return array_merge($IaeCl, $bxz93); goto yAHLr; yAHLr: } public function getDriverFullPath($aurrr) { goto gnhed; AOTys: if (PathUtil::isPublicNetPath($aurrr)) { return $aurrr; } goto aUTNa; gnhed: $aurrr = parent::getDriverFullPath($aurrr); goto AOTys; aUTNa: return $this->domain() . $aurrr; goto jRuHO; jRuHO: } public function getDriverFullPathInternal($aurrr) { goto LQ46I; ybxfc: if (PathUtil::isPublicNetPath($aurrr)) { return $aurrr; } goto NYH0f; LQ46I: $aurrr = parent::getDriverFullPath($aurrr); goto ybxfc; NYH0f: return $this->domainInternal() . $aurrr; goto z7mdT; z7mdT: } }