<?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($zonFp) { goto nnHrY; nnHrY: $ui4CR = array('driver' => $this->remoteType, 'domain' => $this->domain()); goto dHrym; v8puQ: return array_merge($zonFp, $ui4CR); goto hQuod; dHrym: $this->repository->updateData($zonFp['id'], $ui4CR); goto v8puQ; hQuod: } public function getDriverFullPath($nAf_0) { goto xD9lL; bI6VD: if (PathUtil::isPublicNetPath($nAf_0)) { return $nAf_0; } goto Gn3CE; xD9lL: $nAf_0 = parent::getDriverFullPath($nAf_0); goto bI6VD; Gn3CE: return $this->domain() . $nAf_0; goto jEtvd; jEtvd: } public function getDriverFullPathInternal($nAf_0) { goto YRxF1; h5q2T: if (PathUtil::isPublicNetPath($nAf_0)) { return $nAf_0; } goto DGtbI; YRxF1: $nAf_0 = parent::getDriverFullPath($nAf_0); goto h5q2T; DGtbI: return $this->domainInternal() . $nAf_0; goto WcCSS; WcCSS: } }