/** * @return boolean */ private function isFileUpToDate() { $f = fopen($this->mergedAsset->getAbsoluteLocation(), 'r'); $firstLine = fgets($f); fclose($f); if (!empty($firstLine) && trim($firstLine) == trim($this->getCacheBusterValue())) { return true; } // Some CSS file in the merge, has changed since last merged asset was generated // Note: we do not detect changes in @import'ed LESS files return false; }
/** * @param UIAsset $uiAsset */ private function serveJsFile($uiAsset) { ProxyHttp::serverStaticFile($uiAsset->getAbsoluteLocation(), self::JS_MIME_TYPE); }