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 = [])
Returns the asset for the given relative reference.
string
applyVersion(string $url, string $path)
Appends a ?v={filemtime} version parameter to the URL.
string
getBaseUrl()
No description
string
getBasePath()
No description
Details
at line 17
__construct(string $baseUrl, string $basePath, array $extensions = [], bool $versioning = true)
No description
at line 32
Asset
getAsset(string $reference, array $options = [])
Returns the asset for the given relative reference.
Tries configured extensions in order and appends a version query parameter if enabled. Supported option: 'version' => bool (overrides the mapper-level versioning setting)
at line 53
protected string
applyVersion(string $url, string $path)
Appends a ?v={filemtime} version parameter to the URL.
at line 84
string
getBaseUrl()
No description
at line 90
string
getBasePath()
No description