PHP Class Jyxo\Input\Upload

Author: Jakub Tománek
Datei anzeigen Open project: jyxo/php Class Usage Examples

Public Methods

Method 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 method

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

__toString() public method

Conversion to string because of other validators.
public __toString ( ) : string
return string

confirmUpload() public method

Confirms that the file was successfully uploaded.
public confirmUpload ( ) : self
return self

error() public method

Returns upload error type.
public error ( ) : integer
return integer

extension() public method

Returns file extension.
public extension ( ) : string | null
return string | null

filename() public method

Returns file name.
public filename ( ) : string | null
return string | null

move() public method

Moves the uploaded file.
public move ( string $destination ) : boolean
$destination string File destination
return boolean

tmpName() public method

Returns file's temporary name.
public tmpName ( ) : string
return string