class VersionStrategy implements VersionStrategyInterface

class VersionStrategy

Properties

private string $manifestPath
private string $format
private string[] $hashes

Methods

void
__construct(string $manifestPath, string $format = null)

No description

string
getVersion(string $path)

Returns the md5 hash of the asset as version

string
applyVersion(string $path)

Applies the version strategy on the given path

loadManifest()

Loads the manifest.json file

Details

at line 38
void __construct(string $manifestPath, string $format = null)

Parameters

string $manifestPath The path of manifest.json file generated by the 'g6k:assets:manifest:update' console command
string $format The format of the returned url of the asset

Return Value

void

at line 49
string getVersion(string $path)

Returns the md5 hash of the asset as version

Parameters

string $path The path of the asset

Return Value

string The md5 hash of the asset

at line 63
string applyVersion(string $path)

Applies the version strategy on the given path

Parameters

string $path The path of the asset

Return Value

string The versionized path

at line 80
private loadManifest()

Loads the manifest.json file

return mixed