class Resolver (View source)

Properties

protected $app
protected Connection $connection

Methods

__construct(Application $app, Connection $connection)

Resolver constructor.

null|string
getPath(Version $file_version, Version $thumbnail)

Get the path for a file version

null|string
getStoredPath(int $file_id, int $version_id, int $storage_location_id, string $thumbnail_handle)

Get the stored path for a file

storePath($path, $file_id, $version_id, $storage_location_id, $thumbnail_handle, bool $isBuilt = true)

Store a path against a storage location for a file version and a thumbnail handle

string
determinePath(Version $file_version, Version $thumbnail, StorageLocation $storage, ConfigurationInterface $configuration)

Determine the path for a file version thumbnail based on the storage location

mixed
getBuiltPath($path, Version $file_version, Version $thumbnail, StorageLocation $storage, ConfigurationInterface $configuration)

An access point for overriding how paths are built

string
getPathFromConfiguration(string $path, ConfigurationInterface $configuration)

Get the path from a configuration object

Details

__construct(Application $app, Connection $connection)

Resolver constructor.

Parameters

Application $app
Connection $connection

null|string getPath(Version $file_version, Version $thumbnail)

Get the path for a file version

Parameters

Version $file_version
Version $thumbnail

Return Value

null|string

protected null|string getStoredPath(int $file_id, int $version_id, int $storage_location_id, string $thumbnail_handle)

Get the stored path for a file

Parameters

int $file_id
int $version_id
int $storage_location_id
string $thumbnail_handle

Return Value

null|string

protected storePath($path, $file_id, $version_id, $storage_location_id, $thumbnail_handle, bool $isBuilt = true)

Store a path against a storage location for a file version and a thumbnail handle

Parameters

$path
$file_id
$version_id
$storage_location_id
$thumbnail_handle
bool $isBuilt

Have we had the configuration generate the path yet

protected string determinePath(Version $file_version, Version $thumbnail, StorageLocation $storage, ConfigurationInterface $configuration)

Determine the path for a file version thumbnail based on the storage location

NOTE: If you're wanting to change how file paths are determined, a better method to override would be ->getBuiltPath()

Parameters

Version $file_version
Version $thumbnail
StorageLocation $storage
ConfigurationInterface $configuration

Return Value

string

protected mixed getBuiltPath($path, Version $file_version, Version $thumbnail, StorageLocation $storage, ConfigurationInterface $configuration)

An access point for overriding how paths are built

Parameters

$path
Version $file_version
Version $thumbnail
StorageLocation $storage
ConfigurationInterface $configuration

Return Value

mixed

protected string getPathFromConfiguration(string $path, ConfigurationInterface $configuration)

Get the path from a configuration object

Parameters

string $path
ConfigurationInterface $configuration

Return Value

string