final class ImageVariantPathResolver (View source)

Resolves bounded persistent-original and public-variant paths without making originals public by default

Methods

string

Resolves the physical filesystem path of the asset's persistent original

string
originalReference(string $assetId, string $sourceVersion, ImageOriginalStorage $storage, ImageFormat $format, ImageDimensions $dimensions)

Creates the canonical persistent-original reference; callers choose its public or private storage boundary.

string

Resolves the physical filesystem path of a derived public variant

string
string

Resolves the exact public directory owned by one immutable source version.

string
string

Resolves a non-public lock path for one deterministic variant.

string

Creates the public image reference for a derived variant

Details

__construct

__construct(ApplicationContext $context, DirectoryPathGenerator $directories)

No description

Parameters

ApplicationContext $context
DirectoryPathGenerator $directories

originalPath

string originalPath(ImageAsset $asset)

Resolves the physical filesystem path of the asset's persistent original

Parameters

ImageAsset $asset

Return Value

string

originalReference

ImageOriginalReference originalReference(string $assetId, string $sourceVersion, ImageOriginalStorage $storage, ImageFormat $format, ImageDimensions $dimensions)

Creates the canonical persistent-original reference; callers choose its public or private storage boundary.

Parameters

string $assetId
string $sourceVersion
ImageOriginalStorage $storage
ImageFormat $format
ImageDimensions $dimensions

Return Value

ImageOriginalReference

variantPath

string variantPath(ImageAsset $asset, ImageVariantDefinition $definition)

Resolves the physical filesystem path of a derived public variant

Parameters

ImageAsset $asset
ImageVariantDefinition $definition

Return Value

string

variantDirectory

string variantDirectory(ImageAsset $asset)

Resolves the exact public directory owned by one immutable source version.

Parameters

ImageAsset $asset

Return Value

string

variantLockPath

string variantLockPath(ImageAsset $asset, ImageVariantDefinition $definition)

Resolves a non-public lock path for one deterministic variant.

Parameters

ImageAsset $asset
ImageVariantDefinition $definition

Return Value

string

reference

Creates the public image reference for a derived variant

Parameters

ImageAsset $asset
ImageVariantDefinition $definition

Return Value

ImageReference