Skip to content
Corex

AssetVersion

Corex\Assets\AssetVersion · class · Core layer

The per-environment cache-busting strategy (spec 047): local → filemtime (busts on every edit); staging/production → the manifest content hash when available, else the framework/ site version (busts on a release). A missing asset or a path that escapes its base falls back to the framework/site version — never an error, never a traversal. Pure (the mtime + manifest hash are injected).

token(string $relative, ?int $mtime, ?string $manifestHash, AssetEnvironment $environment, string $fallback): string

Section titled “token(string $relative, ?int $mtime, ?string $manifestHash, AssetEnvironment $environment, string $fallback): string”