Méthode | Description | |
---|---|---|
__construct ( ) | ||
getErrors ( ) : null | ||
getFirstErrorMessage ( ) : mixed | 得到第一个错误信息 | |
getInstance ( ) : |
||
getStrategy ( ) : zgldh\UploadManager\UploadStrategyInterface | ||
getUploadUrl ( $disk, $path ) : string | 得到已上传文件的URL | |
storeErrors ( zgldh\UploadManager\UploadException $e ) | ||
update ( &$upload, Symfony\Component\HttpFoundation\File\UploadedFile $file, null $preCallback = null ) : boolean | 用已上传文件更新一个上传对象 | |
updateByUrl ( &$upload, $url, null $preCallback = null ) : boolean | 用URL更新一个上传对象 | |
upload ( $file, null $preCallback = null ) : Upload | boolean | 保存上传文件,生成上传对象 | |
uploadByUrl ( $url, null $preCallback = null ) : Upload | boolean | 从URL获取文件并保存,生成上传对象 | |
withDisk ( $diskName = null ) | 设置默认disk名字 | |
withValidator ( $validatorGroups ) | 设置验证机制, 要在upload、update之前调用 |
Méthode | Description | |
---|---|---|
coreUpload ( $upload, $uploadedFilePath, $file, $preCallback ) : boolean | 核心上传 | |
newUploadModel ( ) | ||
removeOldFile ( $disk, $path ) |
public getFirstErrorMessage ( ) : mixed | ||
Résultat | mixed |
public static getInstance ( ) : |
||
Résultat |
public static getStrategy ( ) : zgldh\UploadManager\UploadStrategyInterface | ||
Résultat | zgldh\UploadManager\UploadStrategyInterface |
public getUploadUrl ( $disk, $path ) : string | ||
$disk | ||
$path | ||
Résultat | string |
public storeErrors ( zgldh\UploadManager\UploadException $e ) | ||
$e | zgldh\UploadManager\UploadException |
public updateByUrl ( &$upload, $url, null $preCallback = null ) : boolean | ||
$upload | ||
$url | ||
$preCallback | null | |
Résultat | boolean |
public uploadByUrl ( $url, null $preCallback = null ) : Upload | boolean | ||
$url | ||
$preCallback | null | |
Résultat | Upload | boolean |
public withDisk ( $diskName = null ) | ||
$diskName | config/filesystems.php disks数组内的key |
public withValidator ( $validatorGroups ) | ||
$validatorGroups | 验证组的名字 |