ProCacheFileMerger class

Copyright (C) 2023 by Ryan Cramer

This is a commercially licensed and supported module DO NOT DISTRIBUTE


Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the ProCacheFileMerger class also inherits all the methods and properties of: Wire.

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
ProCacheFileMerger::clean()
intClean up the merged file cache, removing old/expired files 
ProCacheFileMerger::clear()
intClear out all cached files 
ProCacheFileMerger::clearFiles($basenames)
intClear files by basename 
ProCacheFileMerger::compileLESS(string $file)
stringCompile a LESS file 
ProCacheFileMerger::compileSCSS(string $file)
string boolCompile an SCSS file 
ProCacheFileMerger::getDestination()
None 
ProCacheFileMerger::getFileContents($file)
stringGet the contents of a file
ProCacheFileMerger::getFiles()
arrayGet all files in the merge cache (both css and js) 
ProCacheFileMerger::getHashSRI()
stringSRI hash for inclusion in script tag, only available after a merge() call that specified use of $sri 
ProCacheFileMerger::getLESS()
lesscReturn instance of LESS compiler 
ProCacheFileMerger::getMinifierCSS()
None 
ProCacheFileMerger::getMinifierJS()
None 
ProCacheFileMerger::getNumFiles()
intGet the number of files in the merge cache 
ProCacheFileMerger::getSCSS()
ScssPhp\ScssPhp\CompilerReturn instance of SCSS compiler 
ProCacheFileMerger::merge($files)
$thisGiven a list of file URLs, merge them into a single file 
ProCacheFileMerger::mergeCSSFilesInMarkup(string $html)
stringGiven contents of an HTML document merge and minify <link rel='stylesheet'> tags 
ProCacheFileMerger::mergeJSFilesInMarkup(string $html)
stringGiven contents of an HTML document merge and minify <script src='...'></script> tags 
ProCacheFileMerger::minifyInlineCSS(string $out)
intMinify inline CSS in the given HTML string 
ProCacheFileMerger::minifyInlineJS(string $out)
intMinify inline JS in the given HTML string 
ProCacheFileMerger::path()
stringGet the path for the merged file 
ProCacheFileMerger::procache()
ProCacheGet or set ProCache instance 
ProCacheFileMerger::setDestination($destination)
$thisSet the destination for merged files 
ProCacheFileMerger::setExpiration($seconds)
$thisSet the max age of a cached CSS/JS file 
ProCacheFileMerger::setExtension($ext)
$thisSet the file extension 
ProCacheFileMerger::setMaxImportSizeCSS(int $size)
$thisSet the max CSS file import size (for background images, etc.) 
ProCacheFileMerger::setPrefix($prefix)
$thisSet the file prefix (default=pwpc) 
ProCacheFileMerger::setSource($source)
$thisSet the relative source directory 
ProCacheFileMerger::updateCSS($out, $file)
NoneAdjustments to CSS file contents 
ProCacheFileMerger::url()
stringGet the URL for the merged file 

Additional methods and properties

In addition to the methods and properties above, ProCacheFileMerger also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.251