PHP Interface ManaPHP\Http\Request\FileInterface

Show file Open project: manaphp/manaphp

Public Methods

Method Description
getExtension ( ) : string Returns the file extension
getKey ( ) : string Returns the file key
getName ( ) : string Returns the real name of the uploaded file
getSize ( ) : integer Returns the file size of the uploaded file
getTempName ( ) : string Returns the temporal name of the uploaded file
getType ( ) : string Returns the mime type reported by the browser This mime type is not completely secure, use getRealType() instead
moveTo ( string $dst, string | false $allowedExtensions = 'jpg,jpeg,png,gif,doc,xls,pdf,zip' ) Move the temporary file to a destination

Method Details

getExtension() public method

Returns the file extension
public getExtension ( ) : string
return string

getKey() public method

Returns the file key
public getKey ( ) : string
return string

getName() public method

Returns the real name of the uploaded file
public getName ( ) : string
return string

getSize() public method

Returns the file size of the uploaded file
public getSize ( ) : integer
return integer

getTempName() public method

Returns the temporal name of the uploaded file
public getTempName ( ) : string
return string

getType() public method

Returns the mime type reported by the browser This mime type is not completely secure, use getRealType() instead
public getType ( ) : string
return string

moveTo() public method

Move the temporary file to a destination
public moveTo ( string $dst, string | false $allowedExtensions = 'jpg,jpeg,png,gif,doc,xls,pdf,zip' )
$dst string
$allowedExtensions string | false