<?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($zvN10) { goto AtQqf; zQSnv: return array_merge($zvN10, $CIt7N); goto r9g3U; PqgWL: $this->repository->updateData($zvN10['id'], $CIt7N); goto zQSnv; AtQqf: $CIt7N = array('driver' => $this->remoteType, 'domain' => $this->domain()); goto PqgWL; r9g3U: } public function getDriverFullPath($YhsOb) { goto BfGmI; ojr_U: return $this->domain() . $YhsOb; goto tbtKP; rZPkk: if (PathUtil::isPublicNetPath($YhsOb)) { return $YhsOb; } goto ojr_U; BfGmI: $YhsOb = parent::getDriverFullPath($YhsOb); goto rZPkk; tbtKP: } public function getDriverFullPathInternal($YhsOb) { goto j7zOa; j7zOa: $YhsOb = parent::getDriverFullPath($YhsOb); goto wijM3; Sw25G: return $this->domainInternal() . $YhsOb; goto GH1l3; wijM3: if (PathUtil::isPublicNetPath($YhsOb)) { return $YhsOb; } goto Sw25G; GH1l3: } }