FilesystemMapper
class FilesystemMapper implements Mapper
Maps asset references to files within a specified local directory.
Supports configurable versioning and optional extension auto-detection.
Constants
private OptionVersion |
|
Methods
__construct(string $baseUrl, string $basePath, array $extensions = [], bool $versioning = true)
No description
getAsset(string $reference, array $options = [])
Resolves a relative reference to an asset within the configured base path.
string
applyVersion(string $url, string $path)
No description
string
getBaseUrl()
Returns the base URL for this mapper.
string
getBasePath()
Returns the base path for this mapper.
Details
at line 17
__construct(string $baseUrl, string $basePath, array $extensions = [], bool $versioning = true)
No description
at line 31
Asset
getAsset(string $reference, array $options = [])
Resolves a relative reference to an asset within the configured base path.
Attempts to find a matching extension if configured and applies versioning if enabled. Available options: 'version' => bool: Whether to apply versioning (defaults to true)
at line 49
protected string
applyVersion(string $url, string $path)
No description
at line 83
string
getBaseUrl()
Returns the base URL for this mapper.
at line 92
string
getBasePath()
Returns the base path for this mapper.