ProCacheFileMerger class

Located in file /site/modules/ProCache/ProCacheFileMerger.php

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?        

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 bool intCompile an SCSS file 
ProCacheFileMerger::getDestination()
(nothing) 
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()
(nothing) 
ProCacheFileMerger::getMinifierJS()
(nothing) 
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)
(nothing)Adjustments 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.244

Latest news

  • ProcessWire Weekly #559
    The 559th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 25 January 2025
  • ProcessWire 3.0.244 new main/master version
    ProcessWire 3.0.244 is our newest main/master/stable version. It's been more than a year in the making and is packed with tons of new features, issue fixes, optimizations and more. This post covers all the details.
    Blog / 18 January 2025
  • Subscribe to weekly ProcessWire news

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani