PHP 클래스 UploadBehavior, uploadpack

Enables users to easily add file uploading and necessary validation rules PHP versions 4 and 5 Copyright 2010, Jose Diaz-Gonzalez Licensed under The MIT License Redistributions of files must retain the above copyright notice.
상속: extends ModelBehavior
파일 보기 프로젝트 열기: szajbus/uploadpack 1 사용 예제들

공개 메소드들

메소드 설명
afterDelete ( Model $model )
afterSave ( Model $model, $create, $options = [] )
attachmentContentType ( Model $model, $value, $contentTypes, $options = [] )
attachmentMaxSize ( Model $model, $value, $max, $options = [] )
attachmentMinSize ( Model $model, $value, $min, $options = [] )
attachmentPresence ( Model $model, $value, $options = [] )
beforeDelete ( Model $model, $cascade = true )
beforeSave ( Model $model, $options = [] )
beforeValidate ( Model $model, $options = [] )
interpolate ( $modelName, $modelId, $field, $filename, $style = 'original', $defaults = [] )
maxHeight ( Model $model, $value, $maxHeight, $options = [] )
maxWidth ( Model $model, $value, $maxWidth, $options = [] )
minHeight ( Model $model, $value, $minHeight, $options = [] )
minWidth ( Model $model, $value, $minWidth, $options = [] )
phpUploadError ( Model $model, $value, $uploadErrors = ['UPLOAD_ERR_INI_SIZE', 'UPLOAD_ERR_FORM_SIZE', 'UPLOAD_ERR_PARTIAL', 'UPLOAD_ERR_NO_FILE', 'UPLOAD_ERR_NO_TMP_DIR', 'UPLOAD_ERR_CANT_WRITE', 'UPLOAD_ERR_EXTENSION'], $options = [] )
setup ( Model $model, $settings = [] )

보호된 메소드들

메소드 설명
afterMove ( $file )

비공개 메소드들

메소드 설명
_deleteFiles ( &$model )
_fetchFromUrl ( $url )
_interpolate ( &$model, $field, $filename, $style )
_pathinfo ( $filename )
_prepareToDeleteFiles ( &$model, $field = null, $forceRead = false )
_prepareToWriteFiles ( &$model, $field )
_reset ( )
_resize ( $srcFile, $destFile, $geometry, $quality = 75, $alpha = false )
_validateDimension ( $upload, $mode, $axis, $value, $options )
_writeFiles ( &$model )

메소드 상세

afterDelete() 공개 메소드

public afterDelete ( Model $model )
$model Model

afterMove() 보호된 메소드

protected afterMove ( $file )

afterSave() 공개 메소드

public afterSave ( Model $model, $create, $options = [] )
$model Model

attachmentContentType() 공개 메소드

public attachmentContentType ( Model $model, $value, $contentTypes, $options = [] )
$model Model

attachmentMaxSize() 공개 메소드

public attachmentMaxSize ( Model $model, $value, $max, $options = [] )
$model Model

attachmentMinSize() 공개 메소드

public attachmentMinSize ( Model $model, $value, $min, $options = [] )
$model Model

attachmentPresence() 공개 메소드

public attachmentPresence ( Model $model, $value, $options = [] )
$model Model

beforeDelete() 공개 메소드

public beforeDelete ( Model $model, $cascade = true )
$model Model

beforeSave() 공개 메소드

public beforeSave ( Model $model, $options = [] )
$model Model

beforeValidate() 공개 메소드

public beforeValidate ( Model $model, $options = [] )
$model Model

interpolate() 공개 정적인 메소드

public static interpolate ( $modelName, $modelId, $field, $filename, $style = 'original', $defaults = [] )

maxHeight() 공개 메소드

public maxHeight ( Model $model, $value, $maxHeight, $options = [] )
$model Model

maxWidth() 공개 메소드

public maxWidth ( Model $model, $value, $maxWidth, $options = [] )
$model Model

minHeight() 공개 메소드

public minHeight ( Model $model, $value, $minHeight, $options = [] )
$model Model

minWidth() 공개 메소드

public minWidth ( Model $model, $value, $minWidth, $options = [] )
$model Model

phpUploadError() 공개 메소드

public phpUploadError ( Model $model, $value, $uploadErrors = ['UPLOAD_ERR_INI_SIZE', 'UPLOAD_ERR_FORM_SIZE', 'UPLOAD_ERR_PARTIAL', 'UPLOAD_ERR_NO_FILE', 'UPLOAD_ERR_NO_TMP_DIR', 'UPLOAD_ERR_CANT_WRITE', 'UPLOAD_ERR_EXTENSION'], $options = [] )
$model Model

setup() 공개 메소드

public setup ( Model $model, $settings = [] )
$model Model