PHP Class Nette\Http\FileUpload

Inheritance: use trait Nette\SmartObject
Afficher le fichier Open project: nette/http Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $value )
__toString ( ) : string Returns the path to an uploaded file.
getContentType ( ) : string | null Returns the MIME content type of an uploaded file.
getContents ( ) : string | null Get file contents.
getError ( ) : integer Returns the error code. {@link http://php.net/manual/en/features.file-upload.errors.php}
getImageSize ( ) : array | null Returns the dimensions of an uploaded image as array.
getName ( ) : string Returns the file name.
getSanitizedName ( ) : string Returns the sanitized file name.
getSize ( ) : integer Returns the size of an uploaded file.
getTemporaryFile ( ) : string Returns the path to an uploaded file.
hasFile ( ) : boolean
isImage ( ) : boolean Is uploaded file GIF, PNG or JPEG?
isOk ( ) : boolean Is there any error?
move ( $dest ) : self Move uploaded file to new location.
toImage ( ) : Nette\Utils\Image Returns the image.

Method Details

__construct() public méthode

public __construct ( $value )

__toString() public méthode

Returns the path to an uploaded file.
public __toString ( ) : string
Résultat string

getContentType() public méthode

Returns the MIME content type of an uploaded file.
public getContentType ( ) : string | null
Résultat string | null

getContents() public méthode

Get file contents.
public getContents ( ) : string | null
Résultat string | null

getError() public méthode

Returns the error code. {@link http://php.net/manual/en/features.file-upload.errors.php}
public getError ( ) : integer
Résultat integer

getImageSize() public méthode

Returns the dimensions of an uploaded image as array.
public getImageSize ( ) : array | null
Résultat array | null

getName() public méthode

Returns the file name.
public getName ( ) : string
Résultat string

getSanitizedName() public méthode

Returns the sanitized file name.
public getSanitizedName ( ) : string
Résultat string

getSize() public méthode

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

getTemporaryFile() public méthode

Returns the path to an uploaded file.
public getTemporaryFile ( ) : string
Résultat string

hasFile() public méthode

public hasFile ( ) : boolean
Résultat boolean

isImage() public méthode

Is uploaded file GIF, PNG or JPEG?
public isImage ( ) : boolean
Résultat boolean

isOk() public méthode

Is there any error?
public isOk ( ) : boolean
Résultat boolean

move() public méthode

Move uploaded file to new location.
public move ( $dest ) : self
Résultat self

toImage() public méthode

Returns the image.
public toImage ( ) : Nette\Utils\Image
Résultat Nette\Utils\Image