Class humhub\modules\file\validators\FileValidator

Inheritancehumhub\modules\file\validators\FileValidator » yii\validators\FileValidator
Available since version1.2

FileValidator

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$denyDoubleFileExtensions boolean Deny double file extensions humhub\modules\file\validators\FileValidator
$useDefaultExtensionRestriction boolean Allow only file extensions which are specified in administration section humhub\modules\file\validators\FileValidator

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
checkMemoryLimit() Checks memory limit if GD is used for image conversions humhub\modules\file\validators\FileValidator
validateValue() humhub\modules\file\validators\FileValidator

Property Details

$denyDoubleFileExtensions public property

Deny double file extensions

$useDefaultExtensionRestriction public property

Allow only file extensions which are specified in administration section

Method Details

checkMemoryLimit() protected method

Checks memory limit if GD is used for image conversions

protected array|null checkMemoryLimit ( $file )
$file \yii\web\UploadedFile
throws \yii\base\Exception
init() public method

public void init ( )
validateAttribute() public method

public void validateAttribute ( $model, $attribute )
$model
$attribute
validateFileName() public method

public void validateFileName ( $model, $attribute )
$model
$attribute
validateValue() protected method

protected void validateValue ( $file )
$file