class AssetDumper implements AssetDumperInterface (View source)

Dumps a CSS or JavaScript asset.

Properties

protected FileSystemInterface $fileSystem

The file system service.

Methods

__construct(FileSystemInterface $file_system)

AssetDumper constructor.

string
dump(string $data, string $file_extension)

Dumps an (optimized) asset to persistent storage.

Details

__construct(FileSystemInterface $file_system)

AssetDumper constructor.

Parameters

FileSystemInterface $file_system

The file handler.

string dump(string $data, string $file_extension)

Dumps an (optimized) asset to persistent storage.

Parameters

string $data

An (optimized) asset's contents.

string $file_extension

The file extension of this asset.

Return Value

string

A URI to access the dumped asset.