<?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($yHf3t) { goto rr7sU; qP_Qo: Cache::put($AeeYP, '', 0); goto FyaI4; rr7sU: $a3qUm = Cache::get($AeeYP = self::CACHE_PREFIX . $yHf3t, null); goto lM8G2; FyaI4: return $yHf3t; goto xzdtl; Fkttd: $hhcEM = $yHf3t; goto kNQoI; kNQoI: if ('&' == $uGNwF) { $hhcEM = substr($yHf3t, 0, strpos($yHf3t, '?')); } goto k4gqF; lM8G2: $uGNwF = false === strpos($yHf3t, '?') ? '?' : '&'; goto w0YIt; k4gqF: if (file_exists($hhcEM)) { goto trHnr; trHnr: $a3qUm = '' . crc32(md5_file($hhcEM)); goto aJrQk; aJrQk: Cache::put($AeeYP, $a3qUm, 0); goto fPY7Q; fPY7Q: return $yHf3t . $uGNwF . $a3qUm; goto cV8pz; cV8pz: } goto qP_Qo; w0YIt: if (null !== $a3qUm) { return $yHf3t . $uGNwF . $a3qUm; } goto Fkttd; xzdtl: } public function getCDN($yHf3t) { return config('modstart.asset.cdn'); } }