Interface Yiisoft\Assets\AssetConverterInterface
| Implemented by | Yiisoft\Assets\AssetConverter |
|---|
The AssetConverterInterface must be implemented by asset converter classes. The job of such class is to
convert an asset from one format to another. For example, from Sass to CSS.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| convert() | Converts a given asset file into another format. | Yiisoft\Assets\AssetConverterInterface |
Method Details
Converts a given asset file into another format.
| public abstract convert( string $asset, string $basePath, array $optionsConverter = [] ): string | ||
| $asset | string |
The asset file path, relative to Yiisoft\Assets\AssetBundle::$basePath. |
| $basePath | string |
The directory the $asset is relative to. |
| $optionsConverter | array |
It allows you to \Yiisoft\Assets\AssetConverter::runCommand() options by Yiisoft\Assets\AssetBundle. |
| return | string |
The converted asset file path, relative to Yiisoft\Assets\AssetBundle::$basePath. |
|---|---|---|
public function convert(string $asset, string $basePath, array $optionsConverter = []): string;
Signup or Login in order to comment.