PHP Класс ManaPHP\Http\Request\File

Наследование: extends ManaPHP\Component, implements ManaPHP\Http\Request\FileInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_alwaysRejectedExtensions string
$_file array
$_key string

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

Метод Описание
__construct ( string $key, array $file ) \ManaPHP\Http\Request\File constructor
getError ( ) : string Returns the error code
getExtension ( ) : string Returns the file extension
getKey ( ) : string Returns the file key
getName ( ) : string Returns the real name of the uploaded file
getSize ( ) : integer Returns the file size of the uploaded file
getTempName ( ) : string Returns the temporary name of the uploaded file
getType ( ) : string Returns the mime type reported by the browser This mime type is not completely secure, use getRealType() instead
isUploadedFile ( ) : boolean Checks whether the file has been uploaded via Post.
moveTo ( string $dst, string | false $allowedExtensions = 'jpg,jpeg,png,gif,doc,xls,pdf,zip' ) Moves the temporary file to a destination within the application

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

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

\ManaPHP\Http\Request\File constructor
public __construct ( string $key, array $file )
$key string
$file array

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

Returns the error code
public getError ( ) : string
Результат string

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

Returns the file extension
public getExtension ( ) : string
Результат string

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

Returns the file key
public getKey ( ) : string
Результат string

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

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

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

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

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

Returns the temporary name of the uploaded file
public getTempName ( ) : string
Результат string

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

Returns the mime type reported by the browser This mime type is not completely secure, use getRealType() instead
public getType ( ) : string
Результат string

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

Checks whether the file has been uploaded via Post.
public isUploadedFile ( ) : boolean
Результат boolean

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

Moves the temporary file to a destination within the application
public moveTo ( string $dst, string | false $allowedExtensions = 'jpg,jpeg,png,gif,doc,xls,pdf,zip' )
$dst string
$allowedExtensions string | false

Описание свойств

$_alwaysRejectedExtensions защищенное статическое свойство

protected static string $_alwaysRejectedExtensions
Результат string

$_file защищенное свойство

protected array $_file
Результат array

$_key защищенное свойство

protected string $_key
Результат string