PHP Класс Webiny\Component\Http\Request\Files\File

Наследование: use trait Webiny\Component\StdLib\StdLibTrait
Показать файл Открыть проект

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

Метод Описание
__construct ( string $name, string $tmpName, string $type, integer $error, integer $size ) Constructor.
getError ( ) : integer Get upload error code.
getName ( ) : string Get the original file name.
getSize ( ) : integer Get the size of uploaded file, in bytes.
getTmpName ( ) : string Get the location and name of the uploaded file on the server.
getType ( ) : string Returns mime-type of the uploaded file.
store ( string $folder, null | string $filename = null ) : boolean Store the uploaded file to a designated destination.

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

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

Constructor.
public __construct ( string $name, string $tmpName, string $type, integer $error, integer $size )
$name string Original name of the uploaded file.
$tmpName string Temp file name.
$type string File mime-type.
$error integer Error code, 0 if there is no error.
$size integer Size of the file, in bytes.

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

Get upload error code.
public getError ( ) : integer
Результат integer Error code.

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

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

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

Get the size of uploaded file, in bytes.
public getSize ( ) : integer
Результат integer File size in bytes.

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

Get the location and name of the uploaded file on the server.
public getTmpName ( ) : string
Результат string Temp location of the uploaded file on the server.

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

Returns mime-type of the uploaded file.
public getType ( ) : string
Результат string File mime-type.

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

Store the uploaded file to a designated destination.
public store ( string $folder, null | string $filename = null ) : boolean
$folder string Folder under which the file will be saved.
$filename null | string If you wish to store the file under a different name, other than the original uploaded name.
Результат boolean True if file was successfully saved in the designated destination.