PHP Class ManaPHP\Http\Request\File

Inheritance: extends ManaPHP\Component, implements ManaPHP\Http\Request\FileInterface
Afficher le fichier Open project: manaphp/manaphp

Protected Properties

Свойство Type Description
$_alwaysRejectedExtensions string
$_file array
$_key string

Méthodes publiques

Méthode 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 méthode

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

getError() public méthode

Returns the error code
public getError ( ) : string
Résultat string

getExtension() public méthode

Returns the file extension
public getExtension ( ) : string
Résultat string

getKey() public méthode

Returns the file key
public getKey ( ) : string
Résultat string

getName() public méthode

Returns the real name of the uploaded file
public getName ( ) : string
Résultat string

getSize() public méthode

Returns the file size of the uploaded file
public getSize ( ) : integer
Résultat integer

getTempName() public méthode

Returns the temporary name of the uploaded file
public getTempName ( ) : string
Résultat string

getType() public méthode

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

isUploadedFile() public méthode

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

moveTo() public méthode

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
Résultat string

$_file protected_oe property

protected array $_file
Résultat array

$_key protected_oe property

protected string $_key
Résultat string