Combiner helper class

Protected Properties

protected string $storagePath

storagePath is the output folder for storing combined files.

protected string $localPath

localPath is the local path context to find assets.

protected array $filters

filters to apply to each file.

protected array $prodFilters

prodFilters filters to apply in production

Public Methods

public getDeepHashFromAssets()

public getDeepHashFromAssets(array $assets): string 

getDeepHashFromAssets returns a deep hash on filters that support it.

public getDeepHashLastModified()

public getDeepHashLastModified($combiner): void


public getFilters()

public getFilters($extension = null, $isProduction = false): array 

getFilters returns all defined filters for a given extension

public parse()

public parse($assets, $options = []): void

public prepareCombiner()

public prepareCombiner($assets, $options = []): void

prepareCombiner before dumping

public registerDefaultFilters()

public registerDefaultFilters(): void

public registerFilter()

public registerFilter(
    string|array $extension,
    object $filter,
    bool $isProduction = false
): self 

registerFilter to apply to the combining process.

public resetFilters()

public resetFilters(string $extension = null): self 

resetFilters clears any registered filters.

public setLocalPath()

public setLocalPath($path): void

public setStoragePath()

public setStoragePath($path): void

Protected Methods

protected setDeepHashKeyOnFilters()

protected setDeepHashKeyOnFilters($hash): void 

setHashOnCombinerFilters busts the cache based on a different cache key.