<?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($oU8qf) { goto h8NZN; jCcKn: if (file_exists($oU8qf)) { goto GQE5l; GQE5l: $J5ee9 = '' . crc32(md5_file($oU8qf)); goto FQ1N_; ljfli: return $oU8qf . '?' . $J5ee9; goto RuY1i; FQ1N_: Cache::put($GN5XH, $J5ee9, 0); goto ljfli; RuY1i: } goto PIgCO; JUe9Q: if (null !== $J5ee9) { return $oU8qf . '?' . $J5ee9; } goto jCcKn; byylk: return $oU8qf; goto EWkp2; h8NZN: $J5ee9 = Cache::get($GN5XH = self::CACHE_PREFIX . $oU8qf, null); goto JUe9Q; PIgCO: Cache::put($GN5XH, '', 0); goto byylk; EWkp2: } public function getCDN($oU8qf) { return config('modstart.asset.cdn'); } }