PHP Класс Nette\Http\FileUpload

Наследование: use trait Nette\SmartObject
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

public __construct ( $value )

__toString() публичный Метод

Returns the path to an uploaded file.
public __toString ( ) : string
Результат string

getContentType() публичный Метод

Returns the MIME content type of an uploaded file.
public getContentType ( ) : string | null
Результат string | null

getContents() публичный Метод

Get file contents.
public getContents ( ) : string | null
Результат string | null

getError() публичный Метод

Returns the error code. {@link http://php.net/manual/en/features.file-upload.errors.php}
public getError ( ) : integer
Результат integer

getImageSize() публичный Метод

Returns the dimensions of an uploaded image as array.
public getImageSize ( ) : array | null
Результат array | null

getName() публичный Метод

Returns the file name.
public getName ( ) : string
Результат string

getSanitizedName() публичный Метод

Returns the sanitized file name.
public getSanitizedName ( ) : string
Результат string

getSize() публичный Метод

Returns the size of an uploaded file.
public getSize ( ) : integer
Результат integer

getTemporaryFile() публичный Метод

Returns the path to an uploaded file.
public getTemporaryFile ( ) : string
Результат string

hasFile() публичный Метод

public hasFile ( ) : boolean
Результат boolean

isImage() публичный Метод

Is uploaded file GIF, PNG or JPEG?
public isImage ( ) : boolean
Результат boolean

isOk() публичный Метод

Is there any error?
public isOk ( ) : boolean
Результат boolean

move() публичный Метод

Move uploaded file to new location.
public move ( $dest ) : self
Результат self

toImage() публичный Метод

Returns the image.
public toImage ( ) : Nette\Utils\Image
Результат Nette\Utils\Image