PHP Class ManaPHP\Http\Request\File

Inheritance: extends ManaPHP\Component, implements ManaPHP\Http\Request\FileInterface
Datei anzeigen Open project: manaphp/manaphp

Protected Properties

Property Type Description
$_alwaysRejectedExtensions string
$_file array
$_key string

Public Methods

Method Description
__construct ( string $key, array $file ) \ManaPHP\Http\Request\File constructor
getError ( ) : string Returns the error code
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 temporary 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
isUploadedFile ( ) : boolean Checks whether the file has been uploaded via Post.
moveTo ( string $dst, string | false $allowedExtensions = 'jpg,jpeg,png,gif,doc,xls,pdf,zip' ) Moves the temporary file to a destination within the application

Method Details

__construct() public method

\ManaPHP\Http\Request\File constructor
public __construct ( string $key, array $file )
$key string
$file array

getError() public method

Returns the error code
public getError ( ) : string
return string

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 temporary 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

isUploadedFile() public method

Checks whether the file has been uploaded via Post.
public isUploadedFile ( ) : boolean
return boolean

moveTo() public method

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

Property Details

$_alwaysRejectedExtensions protected_oe static_oe property

protected static string $_alwaysRejectedExtensions
return string

$_file protected_oe property

protected array $_file
return array

$_key protected_oe property

protected string $_key
return string