ProCacheFileMerger::merge()

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-")

  • Warning: the $sri option can add significant overhead, do not call on every request

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.252