<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Assets\Driver; use ModStart\Core\Assets\AssetsPath; use Illuminate\Support\Facades\Cache; class CdnAssetsPath implements AssetsPath { const CACHE_PREFIX = 'modstart:asset-file:'; public function getPathWithHash($qsQD8) { goto LIU8M; t7UN4: Cache::put($vn_Cq, '', 0); goto RDDs5; RcpEP: if (file_exists($qsQD8)) { goto Vw0qL; N7VXq: return $qsQD8 . '?' . $p1Hjz; goto xCGXR; Oz8zR: Cache::put($vn_Cq, $p1Hjz, 0); goto N7VXq; Vw0qL: $p1Hjz = '' . crc32(md5_file($qsQD8)); goto Oz8zR; xCGXR: } goto t7UN4; LIU8M: $p1Hjz = Cache::get($vn_Cq = self::CACHE_PREFIX . $qsQD8, null); goto rbA0M; rbA0M: if (null !== $p1Hjz) { return $qsQD8 . '?' . $p1Hjz; } goto RcpEP; RDDs5: return $qsQD8; goto oEY3Q; oEY3Q: } public function getCDN($qsQD8) { goto aQTCU; mejEH: return $tKxFx[$AEht_]; goto mzx7u; wjWwO: $AEht_ = abs(crc32($qsQD8) % count($tKxFx)); goto mejEH; aQTCU: $tKxFx = config('modstart.asset.cdn_array', array('/')); goto wjWwO; mzx7u: } }