<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Assets\Driver; use Illuminate\Support\Facades\Cache; use ModStart\Core\Assets\AssetsPath; use ModStart\Core\Util\PathUtil; class LocalAssetsPath implements AssetsPath { const CACHE_PREFIX = 'modstart:asset-file:'; public function getPathWithHash($WF06r) { goto j0Tdr; j0Tdr: if (PathUtil::isPublicNetPath($WF06r)) { return $WF06r; } goto lvmNb; D3G2u: if ('&' == $k5Igc) { $dOx_v = substr($WF06r, 0, strpos($WF06r, '?')); } goto DHlCe; SRzsw: $dOx_v = $WF06r; goto D3G2u; lvmNb: $n0mgm = Cache::get($RmSHT = self::CACHE_PREFIX . $WF06r, null); goto Ts2BN; eAiaH: return $WF06r; goto Grj8g; FRHR2: Cache::put($RmSHT, '', 0); goto eAiaH; Ts2BN: $k5Igc = false === strpos($WF06r, '?') ? '?' : '&'; goto tl40A; DHlCe: if (@file_exists($dOx_v)) { goto WMHqY; kt_ri: return $WF06r . $k5Igc . $n0mgm; goto TQRxH; sEQa9: Cache::put($RmSHT, $n0mgm, 0); goto kt_ri; WMHqY: $n0mgm = '' . crc32(md5_file($dOx_v)); goto sEQa9; TQRxH: } goto FRHR2; tl40A: if (null !== $n0mgm) { return $WF06r . $k5Igc . $n0mgm; } goto SRzsw; Grj8g: } public function getCDN($WF06r) { return config('modstart.asset.cdn'); } }