<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Assets\Driver; use ModStart\Core\Assets\AssetsPath; use Illuminate\Support\Facades\Cache; class LocalAssetsPath implements AssetsPath { const CACHE_PREFIX = 'modstart:asset-file:'; public function getPathWithHash($ypGny) { goto GQEU_; KCBkv: return $ypGny; goto ixrGx; G54A_: $BipTd = false === strpos($ypGny, '?') ? '?' : '&'; goto oFH4O; PmXSh: $XT6Y3 = $ypGny; goto Sy1z_; Sy1z_: if ('&' == $BipTd) { $XT6Y3 = substr($ypGny, 0, strpos($ypGny, '?')); } goto cY5AB; oFH4O: if (null !== $yAv3U) { return $ypGny . $BipTd . $yAv3U; } goto PmXSh; GQEU_: $yAv3U = Cache::get($ghVhG = self::CACHE_PREFIX . $ypGny, null); goto G54A_; PPicW: Cache::put($ghVhG, '', 0); goto KCBkv; cY5AB: if (file_exists($XT6Y3)) { goto j_kwT; my6GP: Cache::put($ghVhG, $yAv3U, 0); goto xQ5vd; xQ5vd: return $ypGny . $BipTd . $yAv3U; goto irkcH; j_kwT: $yAv3U = '' . crc32(md5_file($XT6Y3)); goto my6GP; irkcH: } goto PPicW; ixrGx: } public function getCDN($ypGny) { return config('modstart.asset.cdn'); } }