class StoredFiles

The files derived from an uploaded image, each named in a setting.

Constants

CONTENT_TYPES

Properties

protected Cloud $assets

Methods

__construct( SettingsRepositoryInterface $settings, Factory $filesystemFactory)

No description

void
replace(string $settingKey, string|null $contents, string $prefix, string $extension)

Store a file under a fresh name, replacing the one the setting names.

void
replaceSet(string $settingKey, array $files)

Store a set of files, replacing the set the setting names.

static array
options(string $path)

Options for storing an image under a name no other contents will have.

void
delete(string $settingKey)

No description

void
deleteSet(string $settingKey)

No description

array
paths(string $settingKey)

No description

Details

__construct( SettingsRepositoryInterface $settings, Factory $filesystemFactory)

Parameters

SettingsRepositoryInterface $settings
Factory $filesystemFactory

void replace(string $settingKey, string|null $contents, string $prefix, string $extension)

Store a file under a fresh name, replacing the one the setting names.

Parameters

string $settingKey
string|null $contents
string $prefix
string $extension

Return Value

void

void replaceSet(string $settingKey, array $files)

Store a set of files, replacing the set the setting names.

Parameters

string $settingKey
array $files file name, with its extension => contents

Return Value

void

static array options(string $path)

Options for storing an image under a name no other contents will have.

The content type is given rather than left for a remote disk, such as S3, to guess from the bytes, which can take an SVG for text. As the name changes whenever the image does, it can be cached for good.

Parameters

string $path

Return Value

array

void delete(string $settingKey)

Parameters

string $settingKey

Return Value

void

void deleteSet(string $settingKey)

Parameters

string $settingKey

Return Value

void

array paths(string $settingKey)

Parameters

string $settingKey

Return Value

array name => path