Skip to content
PHP Ecosystem
Explore

AssetConverterInterface

API reference › yii › web › AssetConverterInterface

interfaceyii\web\AssetConverterInterface
Since2.0
Sourceframework/web/AssetConverterInterface.php
Implemented by 1 type

The AssetConverterInterface must be implemented by asset converter classes.

MethodDescriptionDefined by
convert() abstractConverts a given asset file into a CSS or JS file.AssetConverterInterface
abstract public function convert(string $asset, string $basePath): string

Converts a given asset file into a CSS or JS file.

Parameters

ParameterTypeDescription
$assetstringThe asset file path, relative to $basePath
$basePathstringThe directory the $asset is relative to.

Returns

string: The converted asset file path, relative to $basePath.