Method | 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之前调用 |
Method | Description | |
---|---|---|
coreUpload ( $upload, $uploadedFilePath, $file, $preCallback ) : boolean | 核心上传 | |
newUploadModel ( ) | ||
removeOldFile ( $disk, $path ) |
public static getInstance ( ) : |
||
return |
public static getStrategy ( ) : zgldh\UploadManager\UploadStrategyInterface | ||
return | zgldh\UploadManager\UploadStrategyInterface |
public getUploadUrl ( $disk, $path ) : string | ||
$disk | ||
$path | ||
return | string |
public storeErrors ( zgldh\UploadManager\UploadException $e ) | ||
$e | zgldh\UploadManager\UploadException |
public updateByUrl ( &$upload, $url, null $preCallback = null ) : boolean | ||
$upload | ||
$url | ||
$preCallback | null | |
return | boolean |
public uploadByUrl ( $url, null $preCallback = null ) : Upload | boolean | ||
$url | ||
$preCallback | null | |
return | Upload | boolean |
public withDisk ( $diskName = null ) | ||
$diskName | config/filesystems.php disks数组内的key |
public withValidator ( $validatorGroups ) | ||
$validatorGroups | 验证组的名字 |