PHP 클래스 Jyxo\Input\Validator\Upload

저자: Jakub Tománek
상속: extends AbstractValidator, implements Jyxo\Input\FilterInterface, implements Jyxo\Input\Validator\ErrorMessage
파일 보기 프로젝트 열기: jyxo/php

공개 메소드들

메소드 설명
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