PHP Trait App\Traits\Uploadable

Show file Open project: ppy/osu-web

Protected Properties

Property Type Description
$_storage

Public Methods

Method Description
deleteFile ( )
deleteWithFile ( )
fileDir ( )
fileName ( )
filePath ( )
fileUrl ( )
getFileId ( )
getFileProperties ( ) Returns a hash with contents of at least 'hash' and 'ext' if there's image or otherwise null.
getFileRoot ( ) Returns root path of where the files are to be stored.
getMaxFileSize ( ) Returns maximum size of the file in bytes. Defaults to 1 MB.
setFileProperties ( $props ) Sets file properties. Either a hash of 'hash' and 'ext' or null.
storage ( )
storeFile ( $filePath, $fileExtension = '' )

Method Details

deleteFile() public method

public deleteFile ( )

deleteWithFile() public method

public deleteWithFile ( )

fileDir() public method

public fileDir ( )

fileName() public method

public fileName ( )

filePath() public method

public filePath ( )

fileUrl() public method

public fileUrl ( )

getFileId() public method

public getFileId ( )

getFileProperties() public method

Assumes attributes 'hash' and 'ext' of the object by default.
public getFileProperties ( )

getFileRoot() abstract public method

Returns root path of where the files are to be stored.
abstract public getFileRoot ( )

getMaxFileSize() public method

Returns maximum size of the file in bytes. Defaults to 1 MB.
public getMaxFileSize ( )

setFileProperties() public method

Assumes attributes 'hash' and 'ext' of the object by default.
public setFileProperties ( $props )

storage() public method

public storage ( )

storeFile() public method

public storeFile ( $filePath, $fileExtension = '' )

Property Details

$_storage protected property

protected $_storage