PHP Class Uploader\Validator

Author: Stanislav WEB | Lugansk ([email protected])
显示文件 Open project: stanislav-web/phalcon-uploader

Public Properties

Property Type Description
$errors array Error message container

Public Methods

Method Description
checkDirectory ( Phalcon\Http\Request\File $file = null, mixed $value ) : boolean Check upload directory
checkDynamic ( Phalcon\Http\Request\File $file = null, string $directory, integer $permission = 511 ) : boolean Create Directory if not exist
checkExtensions ( Phalcon\Http\Request\File $file, mixed $value ) : boolean Check file allowed extensions
checkMaxsize ( Phalcon\Http\Request\File $file, mixed $value ) : boolean Check maximum file size
checkMimes ( Phalcon\Http\Request\File $file, mixed $value ) : boolean Check file allowed extensions
checkMinsize ( Phalcon\Http\Request\File $file, $value ) : boolean Check minimum file size

Method Details

checkDirectory() public method

Check upload directory
public checkDirectory ( Phalcon\Http\Request\File $file = null, mixed $value ) : boolean
$file Phalcon\Http\Request\File
$value mixed
return boolean

checkDynamic() public method

Create Directory if not exist
Author: Mahdi-Mohammadi
public checkDynamic ( Phalcon\Http\Request\File $file = null, string $directory, integer $permission = 511 ) : boolean
$file Phalcon\Http\Request\File
$directory string
$permission integer
return boolean

checkExtensions() public method

Check file allowed extensions
public checkExtensions ( Phalcon\Http\Request\File $file, mixed $value ) : boolean
$file Phalcon\Http\Request\File
$value mixed
return boolean

checkMaxsize() public method

Check maximum file size
public checkMaxsize ( Phalcon\Http\Request\File $file, mixed $value ) : boolean
$file Phalcon\Http\Request\File
$value mixed
return boolean

checkMimes() public method

Check file allowed extensions
public checkMimes ( Phalcon\Http\Request\File $file, mixed $value ) : boolean
$file Phalcon\Http\Request\File
$value mixed
return boolean

checkMinsize() public method

Check minimum file size
public checkMinsize ( Phalcon\Http\Request\File $file, $value ) : boolean
$file Phalcon\Http\Request\File
$value
return boolean

Property Details

$errors public_oe property

Error message container
public array $errors
return array