PHP Класс Jyxo\Input\Validator\Upload

Автор: Jakub Tománek
Наследование: extends AbstractValidator, implements Jyxo\Input\FilterInterface, implements Jyxo\Input\Validator\ErrorMessage
Показать файл Открыть проект

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

Метод Описание
filter ( Upload $in ) : Upload Sets that the file fas successfully uploaded.
getError ( ) : string Returns error message in case of upload error.
isValid ( Upload | string $file ) : boolean Checks if the file was successfully uploaded.
requireUpload ( boolean $flag = true ) : self Sets if a file is required to be uploaded.

Защищенные методы

Метод Описание
isUploaded ( string $file ) : boolean Checks if the file was uploaded.

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

Метод Описание
setError ( integer $error ) Sets upload errors.

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

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

Sets that the file fas successfully uploaded.
public filter ( Upload $in ) : Upload
$in Jyxo\Input\Upload Uploaded file
Результат Jyxo\Input\Upload

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

Returns error message in case of upload error.
public getError ( ) : string
Результат string

isUploaded() защищенный Метод

Checks if the file was uploaded.
protected isUploaded ( string $file ) : boolean
$file string File index in the $_FILES array
Результат boolean

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

Checks if the file was successfully uploaded.
public isValid ( Upload | string $file ) : boolean
$file Jyxo\Input\Upload | string File index in the $_FILES array
Результат boolean

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

Sets if a file is required to be uploaded.
public requireUpload ( boolean $flag = true ) : self
$flag boolean Does the file have to be uploaded
Результат self