function getLibraryContents($sLibrary, $sVersion, $bCompressed) { $oIncluder = new ResourceIncluder(); // Don’t use SSL for downloads // Don’t include dependencies either $oIncluder->addJavaScriptLibrary($sLibrary, $sVersion, $bCompressed, false, false, ResourceIncluder::PRIORITY_NORMAL, false); return LocalJsLibraryFileModule::getResourceIncluderContents($oIncluder); }
public function renderFile() { $oCache = new Cache(implode('/', Manager::getUsedPath()), 'versioned'); header("Content-Type: text/javascript;charset=utf-8"); if ($oCache->entryExists()) { $oCache->sendCacheControlHeaders(); $oCache->passContents(); exit; } $oIncluder = new ResourceIncluder(); // Don’t use SSL for downloads // Don’t include dependencies either $oIncluder->addJavaScriptLibrary($this->aLibraryName, $this->aVersion, $this->bUseCompression, false, false, ResourceIncluder::PRIORITY_NORMAL, false); $sContents = self::getResourceIncluderContents($oIncluder); $oCache->setContents($sContents); $oCache->sendCacheControlHeaders(); print $sContents; }