PHP Class Jyxo\Input\Upload

Author: Jakub Tománek
Afficher le fichier Open project: jyxo/php Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( string $index ) Constructor.
__toString ( ) : string Conversion to string because of other validators.
confirmUpload ( ) : self Confirms that the file was successfully uploaded.
error ( ) : integer Returns upload error type.
extension ( ) : string | null Returns file extension.
filename ( ) : string | null Returns file name.
move ( string $destination ) : boolean Moves the uploaded file.
tmpName ( ) : string Returns file's temporary name.

Method Details

__construct() public méthode

Constructor.
public __construct ( string $index )
$index string File index

__toString() public méthode

Conversion to string because of other validators.
public __toString ( ) : string
Résultat string

confirmUpload() public méthode

Confirms that the file was successfully uploaded.
public confirmUpload ( ) : self
Résultat self

error() public méthode

Returns upload error type.
public error ( ) : integer
Résultat integer

extension() public méthode

Returns file extension.
public extension ( ) : string | null
Résultat string | null

filename() public méthode

Returns file name.
public filename ( ) : string | null
Résultat string | null

move() public méthode

Moves the uploaded file.
public move ( string $destination ) : boolean
$destination string File destination
Résultat boolean

tmpName() public méthode

Returns file's temporary name.
public tmpName ( ) : string
Résultat string