/** * * @param type $aArray * @param type $sString * @return boolean */ public static function findExcludes($aArray, $sString, $bScript = FALSE) { foreach ($aArray as $sValue) { if ($bScript) { $sString = JSMinRegex::minify($sString); } if ($sValue && strpos($sString, $sValue) !== FALSE) { return TRUE; } } return FALSE; }
/** * * @param type $sContent * @param type $sUrl */ protected function MinifyContent($sContent, $sType, $aUrl) { global $_PROFILER; if ($this->params->get($sType . '_minify', 0) && preg_match('#\\s++#', trim($sContent))) { $sUrl = isset($aUrl['url']) ? $aUrl['url'] : ($sType == 'css' ? 'Style' : 'Script') . ' Declaration'; JCH_DEBUG ? $_PROFILER->mark('beforeMinifyContent - "' . $sUrl . '" plgSystem (JCH Optimize)') : null; $sContent = trim($sType == 'css' ? Minify_CSSi::process($sContent) : JSMinRegex::minify($sContent)); JCH_DEBUG ? $_PROFILER->mark('afterMinifyContent - "' . $sUrl . '" plgSystem (JCH Optimize)') : null; } return $sContent; }