interface AssetMapperInterface

Finds and returns assets in the pipeline.

Methods

MappedAsset|null
getAsset(string$logicalPath)

Given the logical path (e.g. path relative to a mapped directory), return the asset.

iterable
allAssets()

Returns all mapped assets.

MappedAsset|null
getAssetFromSourcePath(string$sourcePath)

Fetches the asset given its source path (i.e. filesystem path).

string|null
getPublicPath(string$logicalPath)

Returns the public path for this asset, if it can be found.

Details

MappedAsset|null getAsset(string$logicalPath)

Given the logical path (e.g. path relative to a mapped directory), return the asset.

Parameters

string $logicalPath

Return Value

MappedAsset|null

iterable allAssets()

Returns all mapped assets.

Return Value

iterable

MappedAsset|null getAssetFromSourcePath(string$sourcePath)

Fetches the asset given its source path (i.e. filesystem path).

Parameters

string $sourcePath

Return Value

MappedAsset|null

string|null getPublicPath(string$logicalPath)

Returns the public path for this asset, if it can be found.

Parameters

string $logicalPath

Return Value

string|null