PHP Class zgldh\QiniuStorage\QiniuStorage

显示文件 Open project: zgldh/qiniu-laravel-storage Class Usage Examples

Public Methods

Method Description
allDirectories ( $key )
allFiles ( $key )
append ( $key, $contents ) : integer 附加内容到文件结尾
copy ( $key, $key2 ) : boolean 复制文件到新的路径
delete ( $key ) : boolean 删除文件
deleteDirectory ( $key )
directories ( $key )
disk ( $name )
downloadUrl ( $key, $domainType = 'default' ) : mixed 获取下载地址
exists ( $key ) : boolean 文件是否存在
fetch ( $url, $key ) : boolean 调用fetch将 foo.jpg 数据以 bar.jpg 的名字储存起来。
files ( $key )
get ( $key ) : string 获取文件内容
imageExif ( $key ) : mixed 获取图片EXIF信息
imageInfo ( $key ) : mixed 获取图片信息
imagePreviewUrl ( $key, $opts ) : mixed 获取图片预览URL
lastModified ( $key )
makeDirectory ( $key )
move ( $key, $key2 ) : boolean 移动文件到新的路径
persistentFop ( $key, $opts ) : mixed 执行持久化数据处理
persistentStatus ( $id ) : mixed 查看持久化数据处理的状态
prepend ( $key, $contents ) : integer 附加内容到文件开头
privateDownloadUrl ( $key, $domainType = 'default' ) : mixed 获取私有bucket下载地址
privateImagePreviewUrl ( $key, $opts ) : mixed 获取私有bucket图片预览URL
put ( $key, $contents ) : boolean 上传文件
qetag ( ) : string 得到最后一次执行 put, copy, append 等写入操作后,得到的hash值。详见 https://github.com/qiniu/qetag
size ( $key )
uploadToken ( $key ) : boolean 获取上传Token
verifyCallback ( $contentType, $originAuthorization, $url, $body ) : boolean 验证回调是否合法

Private Methods

Method Description
__construct ( $name )

Method Details

allDirectories() public method

public allDirectories ( $key )

allFiles() public method

public allFiles ( $key )

append() public method

附加内容到文件结尾
public append ( $key, $contents ) : integer
$key
return integer

copy() public method

复制文件到新的路径
public copy ( $key, $key2 ) : boolean
$key
$key2
return boolean

delete() public method

删除文件
public delete ( $key ) : boolean
$key
return boolean

deleteDirectory() public method

public deleteDirectory ( $key )

directories() public method

public directories ( $key )

disk() public static method

public static disk ( $name )

downloadUrl() public method

获取下载地址
public downloadUrl ( $key, $domainType = 'default' ) : mixed
$key
return mixed

exists() public method

文件是否存在
public exists ( $key ) : boolean
$key
return boolean

fetch() public method

调用fetch将 foo.jpg 数据以 bar.jpg 的名字储存起来。
public fetch ( $url, $key ) : boolean
$url
$key
return boolean

files() public method

public files ( $key )

get() public method

获取文件内容
public get ( $key ) : string
$key
return string

imageExif() public method

获取图片EXIF信息
public imageExif ( $key ) : mixed
$key
return mixed

imageInfo() public method

获取图片信息
public imageInfo ( $key ) : mixed
$key
return mixed

imagePreviewUrl() public method

获取图片预览URL
public imagePreviewUrl ( $key, $opts ) : mixed
$key
$opts
return mixed

lastModified() public method

public lastModified ( $key )

makeDirectory() public method

public makeDirectory ( $key )

move() public method

移动文件到新的路径
public move ( $key, $key2 ) : boolean
$key
$key2
return boolean

persistentFop() public method

执行持久化数据处理
public persistentFop ( $key, $opts ) : mixed
$key
$opts
return mixed

persistentStatus() public method

查看持久化数据处理的状态
public persistentStatus ( $id ) : mixed
$id
return mixed

prepend() public method

附加内容到文件开头
public prepend ( $key, $contents ) : integer
$key
$contents
return integer

privateDownloadUrl() public method

获取私有bucket下载地址
public privateDownloadUrl ( $key, $domainType = 'default' ) : mixed
$key
return mixed

privateImagePreviewUrl() public method

获取私有bucket图片预览URL
public privateImagePreviewUrl ( $key, $opts ) : mixed
$key
$opts
return mixed

put() public method

上传文件
public put ( $key, $contents ) : boolean
$key
$contents
return boolean

qetag() public method

得到最后一次执行 put, copy, append 等写入操作后,得到的hash值。详见 https://github.com/qiniu/qetag
public qetag ( ) : string
return string

size() public method

public size ( $key )

uploadToken() public method

获取上传Token
public uploadToken ( $key ) : boolean
$key
return boolean

verifyCallback() public method

验证回调是否合法
public verifyCallback ( $contentType, $originAuthorization, $url, $body ) : boolean
return boolean