<?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($qsQD8) { goto rdDLt; ZgICy: Cache::put($vn_Cq, '', 0); goto gPfrn; oP0kB: $FmvHL = false === strpos($qsQD8, '?') ? '?' : '&'; goto Y_qWc; s4EMs: $UB9Xn = $qsQD8; goto QpGW_; iZCZc: if (file_exists($UB9Xn)) { goto yyR4c; GFTgY: Cache::put($vn_Cq, $p1Hjz, 0); goto FqrhC; FqrhC: return $qsQD8 . $FmvHL . $p1Hjz; goto srCht; yyR4c: $p1Hjz = '' . crc32(md5_file($UB9Xn)); goto GFTgY; srCht: } goto ZgICy; Y_qWc: if (null !== $p1Hjz) { return $qsQD8 . $FmvHL . $p1Hjz; } goto s4EMs; rdDLt: $p1Hjz = Cache::get($vn_Cq = self::CACHE_PREFIX . $qsQD8, null); goto oP0kB; QpGW_: if ('&' == $FmvHL) { $UB9Xn = substr($qsQD8, 0, strpos($qsQD8, '?')); } goto iZCZc; gPfrn: return $qsQD8; goto peuyI; peuyI: } public function getCDN($qsQD8) { return config('modstart.asset.cdn'); } }