<?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($sCmIC) { goto vODDP; miX7s: if (file_exists($a2EFm)) { goto lAvHV; RBMEU: Cache::put($gQjQS, $fEpHF, 0); goto Y8Pug; Y8Pug: return $sCmIC . $MdiJn . $fEpHF; goto lfuUc; lAvHV: $fEpHF = '' . crc32(md5_file($a2EFm)); goto RBMEU; lfuUc: } goto Cv54s; JcFfc: $MdiJn = false === strpos($sCmIC, '?') ? '?' : '&'; goto meeCC; egiTL: return $sCmIC; goto auLRt; vODDP: $fEpHF = Cache::get($gQjQS = self::CACHE_PREFIX . $sCmIC, null); goto JcFfc; meeCC: if (null !== $fEpHF) { return $sCmIC . $MdiJn . $fEpHF; } goto CjCQl; Cv54s: Cache::put($gQjQS, '', 0); goto egiTL; CjCQl: $a2EFm = $sCmIC; goto s4Rfr; s4Rfr: if ('&' == $MdiJn) { $a2EFm = substr($sCmIC, 0, strpos($sCmIC, '?')); } goto miX7s; auLRt: } public function getCDN($sCmIC) { return config('modstart.asset.cdn'); } }