<?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($Jtt5u) { goto ho1CW; Myq02: if (null !== $I4NE6) { return $Jtt5u . $HXmwa . $I4NE6; } goto vRqIE; vRqIE: $l2HBf = $Jtt5u; goto EOZjY; sxda7: $HXmwa = false === strpos($Jtt5u, '?') ? '?' : '&'; goto Myq02; EOZjY: if ('&' == $HXmwa) { $l2HBf = substr($Jtt5u, 0, strpos($Jtt5u, '?')); } goto RIurF; bwv3Y: Cache::put($swetG, '', 0); goto ncy1B; ho1CW: $I4NE6 = Cache::get($swetG = self::CACHE_PREFIX . $Jtt5u, null); goto sxda7; ncy1B: return $Jtt5u; goto LdW98; RIurF: if (file_exists($l2HBf)) { goto F_sxw; u3Vze: Cache::put($swetG, $I4NE6, 0); goto FnBRu; FnBRu: return $Jtt5u . $HXmwa . $I4NE6; goto wX6R2; F_sxw: $I4NE6 = '' . crc32(md5_file($l2HBf)); goto u3Vze; wX6R2: } goto bwv3Y; LdW98: } public function getCDN($Jtt5u) { return config('modstart.asset.cdn'); } }