PHP Class mdm\upload\FileModel

Inheritance: extends yii\db\ActiveRecord
Afficher le fichier Open project: mdmsoft/yii2-upload-file Class Usage Examples

Méthodes publiques

Свойство Type Description
$defaultDirectoryLevel integer
$defaultUploadPath string
$directoryLevel the level of sub-directories to store uploaded files. Defaults to 1. If the system has huge number of uploaded files (e.g. one million), you may use a bigger value (usually no bigger than 3). Using sub-directories is mainly to ensure the file system is not over burdened with a single directory having too many files.
$file yii\web\UploadedFile
$saveCallback Closure
$uploadPath Upload path

Méthodes publiques

Méthode Description
attributeLabels ( )
beforeDelete ( )
beforeSave ( $insert )
getContent ( )
rules ( )
saveAs ( UploadedFile | string $file, array $options = [] ) : boolean | static Save file
tableName ( )

Method Details

attributeLabels() public méthode

public attributeLabels ( )

beforeDelete() public méthode

public beforeDelete ( )

beforeSave() public méthode

public beforeSave ( $insert )

getContent() public méthode

public getContent ( )

rules() public méthode

public rules ( )

saveAs() public static méthode

Save file
public static saveAs ( UploadedFile | string $file, array $options = [] ) : boolean | static
$file yii\web\UploadedFile | string
$options array
Résultat boolean | static

tableName() public static méthode

public static tableName ( )

Property Details

$defaultDirectoryLevel public_oe static_oe property

public static int $defaultDirectoryLevel
Résultat integer

$defaultUploadPath public_oe static_oe property

public static string $defaultUploadPath
Résultat string

$directoryLevel public_oe property

the level of sub-directories to store uploaded files. Defaults to 1. If the system has huge number of uploaded files (e.g. one million), you may use a bigger value (usually no bigger than 3). Using sub-directories is mainly to ensure the file system is not over burdened with a single directory having too many files.
public $directoryLevel

$file public_oe property

public UploadedFile,yii\web $file
Résultat yii\web\UploadedFile

$saveCallback public_oe property

public Closure $saveCallback
Résultat Closure

$uploadPath public_oe property

Upload path
public $uploadPath