<?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($aYJAK) { goto m_2nb; gSZ5k: return $aYJAK; goto Dophf; HcGhe: if (null !== $rCzZc) { return $aYJAK . $wd4s3 . $rCzZc; } goto d_k3B; d_k3B: $qM1En = $aYJAK; goto ahqnF; ahqnF: if ('&' == $wd4s3) { $qM1En = substr($aYJAK, 0, strpos($aYJAK, '?')); } goto jFJhK; Ur8bQ: Cache::put($Xqdgx, '', 0); goto gSZ5k; jFJhK: if (file_exists($qM1En)) { goto f_u8p; CElvv: Cache::put($Xqdgx, $rCzZc, 0); goto jPvZ6; f_u8p: $rCzZc = '' . crc32(md5_file($qM1En)); goto CElvv; jPvZ6: return $aYJAK . $wd4s3 . $rCzZc; goto TUFK6; TUFK6: } goto Ur8bQ; m_2nb: $rCzZc = Cache::get($Xqdgx = self::CACHE_PREFIX . $aYJAK, null); goto dyYQ6; dyYQ6: $wd4s3 = false === strpos($aYJAK, '?') ? '?' : '&'; goto HcGhe; Dophf: } public function getCDN($aYJAK) { return config('modstart.asset.cdn'); } }