PHP Класс Phly\Http\UploadedFile

Наследование: implements Psr\Http\Message\UploadedFileInterface
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( $streamOrFile, $size, $errorStatus, $clientFilename = null, $clientMediaType = null )
getClientFilename ( ) : string | null
getClientMediaType ( )
getError ( ) : integer
getSize ( ) : integer | null
getStream ( )
moveTo ( string $targetPath )

Приватные методы

Метод Описание
writeFile ( string $path ) Write internal stream to given path

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

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

public __construct ( $streamOrFile, $size, $errorStatus, $clientFilename = null, $clientMediaType = null )

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

public getClientFilename ( ) : string | null
Результат string | null The filename sent by the client or null if none was provided.

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

public getClientMediaType ( )

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

См. также: http://php.net/manual/en/features.file-upload.errors.php
public getError ( ) : integer
Результат integer One of PHP's UPLOAD_ERR_XXX constants.

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

public getSize ( ) : integer | null
Результат integer | null The file size in bytes or null if unknown.

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

public getStream ( )

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

См. также: http://php.net/is_uploaded_file
См. также: http://php.net/move_uploaded_file
public moveTo ( string $targetPath )
$targetPath string Path to which to move the uploaded file.