Interface humhub\modules\file\components\StorageManagerInterface

Implemented byhumhub\modules\file\components\StorageManager

StorageManagerInterface

Public Methods

Hide inherited methods

MethodDescriptionDefined By
delete() Deletes a stored file (-variant) humhub\modules\file\components\StorageManagerInterface
get() Returns the complete file path to the stored file (variant). humhub\modules\file\components\StorageManagerInterface
getVariants() Get file variants humhub\modules\file\components\StorageManagerInterface
set() Adds or overwrites the file by given UploadedFile in store humhub\modules\file\components\StorageManagerInterface
setContent() Adds or overwrites the file content by given string in store humhub\modules\file\components\StorageManagerInterface
setFile() Sets the file for this storage manager instance humhub\modules\file\components\StorageManagerInterface

Method Details

delete() public abstract method

Deletes a stored file (-variant)

If not variant is given, also all file variants will be deleted

public abstract void delete ( $variant null )
$variant
get() public abstract method

Returns the complete file path to the stored file (variant).

public abstract string get ( $variant null )
$variant string

Optional the variant string

return string

The complete file path

getVariants() public abstract method

Get file variants

public abstract array getVariants ( )
return array

Returns the stored variants of the file

set() public abstract method

Adds or overwrites the file by given UploadedFile in store

public abstract void set ( \yii\web\UploadedFile $file, $variant null )
$file \yii\web\UploadedFile
$variant string

The variant identifier

setContent() public abstract method

Adds or overwrites the file content by given string in store

public abstract void setContent ( $content, $variant null )
$content string

The new file data

$variant string

The variant identifier

setFile() public abstract method

Sets the file for this storage manager instance

public abstract void setFile ( humhub\modules\file\models\File $file )
$file humhub\modules\file\models\File