ProCacheFileMerger::merge() method

Given a list of file URLs, merge them into a single file

To retrieve the result, call the $this->url() method or append ->url() to your merge call.

Usage

// basic usage
$proCacheFileMerger->merge($files);

// usage with all arguments
$proCacheFileMerger->merge($files, bool $minify = false, bool $sri = false);

Arguments

NameType(s)Description
filesstring, array, WireArray

Array or CSV string of file URLs

minify (optional)bool

Also minify the files? (default=false)

sri (optional)bool

Return file that is named with its subresource integrity hash? (excludes leading "sha256-")

Return value

$this

Object instance it was called from (method supports fluent interface).


ProCacheFileMerger methods and properties

API reference based on ProcessWire core version 3.0.244

Latest news

  • ProcessWire Weekly #560
    In the 560th issue of ProcessWire Weekly we'll check out the latest core updates, cover newly released ProcessWire modules, and more. Read on!
    Weekly.pw / 1 February 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

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull