abstract class UploadImageController extends ShowForumController

Properties

protected Filesystem $uploadDir
protected string $fileExtension
protected string $filePathSettingKey
protected string $filenamePrefix

Methods

__construct(JsonApi $api, SettingsRepositoryInterface $settings, ImageManager $imageManager, TranslatorInterface $translator, Factory $filesystemFactory)

No description

ResponseInterface
handle(ServerRequestInterface $request)

No description

StreamInterface
makeImage(UploadedFileInterface $file)

No description

string
fileExtension(ServerRequestInterface $request, UploadedFileInterface $file)

No description

string
filePathSettingKey(ServerRequestInterface $request, UploadedFileInterface $file)

No description

string
filenamePrefix(ServerRequestInterface $request)

No description

Details

__construct(JsonApi $api, SettingsRepositoryInterface $settings, ImageManager $imageManager, TranslatorInterface $translator, Factory $filesystemFactory)

Parameters

JsonApi $api
SettingsRepositoryInterface $settings
ImageManager $imageManager
TranslatorInterface $translator
Factory $filesystemFactory

ResponseInterface handle(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

ResponseInterface

abstract protected StreamInterface makeImage(UploadedFileInterface $file)

Parameters

UploadedFileInterface $file

Return Value

StreamInterface

protected string fileExtension(ServerRequestInterface $request, UploadedFileInterface $file)

Parameters

ServerRequestInterface $request
UploadedFileInterface $file

Return Value

string

protected string filePathSettingKey(ServerRequestInterface $request, UploadedFileInterface $file)

Parameters

ServerRequestInterface $request
UploadedFileInterface $file

Return Value

string

protected string filenamePrefix(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

string