class JsonManifestVersionStrategy implements VersionStrategyInterface
Reads the versioned path of an asset from a JSON manifest file.
For example, the manifest file might look like this: { "main.js": "main.abc123.js", "css/styles.css": "css/styles.555abc.css" }
You could then ask for the version of "main.js" or "css/styles.css".
__construct(string $manifestPath) | ||
string | getVersion(string $path) With a manifest, we don't really know or care about what the version is. Instead, this returns the path to the versioned file. | |
string | applyVersion(string $path) Applies version to the supplied path. |
string | $manifestPath | Absolute path to the manifest file |
With a manifest, we don't really know or care about what the version is. Instead, this returns the path to the versioned file.
string | $path | A path |
string | The version string |
Applies version to the supplied path.
string | $path | A path |
string | The versionized path |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Asset/VersionStrategy/JsonManifestVersionStrategy.html